1.6.0
This release brings numerous API improvements, as well as fixes and infrastructure updates to the framework.
API changes
Execution environment
The Environment
now exposes API to register user-defined environment types.
This can be done by extending the EnvironmentType
class:
public final class AwsLambda extends EnvironmentType {
@Override
public boolean enabled() {
// ...
}
}
Then, the environment can be registered to give the user ability to check if it's active at any given moment of time:
Environment.instance()
.register(new AwsLambda());
// ...
if (Environment.instance().is(AwsLambda.class)) {
this.sender = new AwsEmailSender();
}
The Spine framework provides two environments out of the box: Production
and Tests
.
- The
io.spine.testing
package is added to the list of known testing libraries. When it occurs in the class path, the environment will always be resolved toTests
[#544].
Protobuf Model definition
(min)
,(max)
and(range)
constraints will now be verified to be the whole numbers when applied to a whole number field (int32
, etc.) [#560].(is)
and(every_is)
options will now be applied simultaneously instead of(is)
taking priority over(every_is)
[#531].- New tools are added for working with regex-es in Protobuf [#520].
- An
(is_required)
validation option is added foroneof
group fields [#523]. - The
spine.ui.Language
enumeration is now defined and contains language codes defined by ISO 639-1 [#522].
Other
JSON parser will now ignore unknown fields, allowing easier data migrations between old/new Protobuf schemas [#518].
Fixes
- The Spine
protoc
plugin location process is simplified. This enables creation of composite builds for Spine-based projects [#559]. Time
is tweaked to provide identical behaviour on all platforms under Java 8 and Java 9+ [#554].- The proper import resolution is implemented for the Dart client [#524].
javax.annotations-api
dependency is added to the project so the Spineprotoc
plugin can be run safely with Java 11 [#546].