Previously, arguments passed to the script were handled in one way
if a service was being started using start-stop-daemon and in another
way if start-stop-daemon wasn’t available or the application is being
launched in run mode. This meant that quoted arguments were only
handled correctly when the application was being started using
start-stop-daemon.
This commit updates the launch script so that argument handling is
the same across all three different way that the application can be
launched.
Closes gh-5942
Commit b7e7bcf made `spring.session.store-type` explicit which means that
users of Spring Session in 1.3 have to set that property to restore the
auto-configuration support in 1.4.
This commit implicitly set the store type to redis if redis is present
and log a warning inviting the user to actually specify that in
configuration.
The entry in the auto-configuration report also mentions that such
arrangement is deprecated.
Closes gh-5838
Using a separate thread to call the application's main method is
unnecessary – the context class loader of the current thread can be
updated instead – and makes exception and exit code handling more
complicated than it needs to be.
This commit updates the Launcher so that it calls the main method
runner using the current (main) thread. As a result, any exception
that's thrown will be caught by the JVM and result in a non-zero exit
code being returned from the process.
Closes gh-5922
This commit deprecates the `ws` starter in favour of a new `web-services`
starter. A deprecation warning auto-configuration has also been added to
the ws starter.
Closes gh-5711
Update Mockito support so that AOP Proxies automatically get additional
`Advice` that allows them to work with Mockito. Prior to this commit a
call to `verify` would fail because exiting AOP advice would confuse
Mockito and an `UnfinishedVerificationException` would be thrown.
The `MockitoAopProxyTargetInterceptor` works by detecting calls to a
mock that have been proceeded by `verify()` and bypassing AOP to
directly call the mock.
The order that `@SpyBean` creation occurs has also been updated to
ensure that that the spy is created before AOP advice is applied.
Without this, the creation of a spy would fail because Mockito copies
'state' to the newly created spied instance. Unfortunately, in the case
of AOP proxies, 'state' includes cglib interceptor fields. This means
that Mockito's own interceptors are clobbered by Spring's AOP
interceptors.
Fixes gh-5837
The getContentType() accessor method on View appears to only be used
for content negotiation. For the Content-Type header to be included in
the response the view needs to set it explicitly when render is called.
Closes gh-5918
Previously, the name of a join table when using Hibernate 5 would
differ from those when using Hibernate 4 with the default
SpringNamingStrategy.
This commit introduces SpringImplicitNamingStrategy which customises the
name of join tables to match those produced by SpringNamingStrategy.
Closes gh-5880
The name of the table for a many-to-many relationship has changed in
Hibernate 5.1.
This commit updates the JPA sample’s import.sql accordingly. It also
updates the repository integration tests to verify that the data has
been imported successfully.
Closes gh-5880
Previously, if the folder which contained the jar was a symlink the
launch script would use the symlinked folder's name when determining
the default identity.
This commit updates the launch script so that symlinks are resolved
and the canonical name of the folder which contains the jar is used
when determining the script's default identity. The behaviour when
APP_NAME has been set is unchanged.
Closes gh-5679
Closes gh-5733
Previously, the CONSOLE_LOG_PATTERN property would always be set as
a result of base.xml including defaults.xml. This made it hard to
override the CONSOLE_LOG_PATTERN as it required a copy and paste of
the configuration.
This commit updates defaults.xml so that CONSOLE_LOG_PATTERN is only
set if it has not already been set. This reduces the configuration to
customize the console log pattern to a handful of lines.
Closes gh-5632
Closes gh-5867
Previously, dependency management was provided for artemis-jms-client
and artemis-jms-server, but none of the other Artermis modules upon
which they depend. This made it possible for a mixture of versions
to end up on the classpath.
This commit adds dependency management for all of the Artemis modules
upon which artemis-jms-client and artemis-jms-server depends. It also
adds dependency management for artermis-amqp-protocol as proposed
in gh-5818
Closes gh-5818
Closes gh-5914
This commit builds on the new abstraction introduced in 2a0b8a7 by
applying the standard JacksonProperties-based
Jackson2ObjectMapperBuilder configuration via a customizer.
It also applies some polishing to the original contribution:
- Code has been formatted
- Logic that applies the customizers has moved to be alongside the code
that creates the builder
- Logic that explicitly sorted the customisers has been removed as
they will be sorted automatically prior to injection
Previously, it was difficult to customize the auto-configured
Jackson2ObjectMapperBuilder. Typically, use of a bean post processor
was required.
This commit introduces Jackson2ObjectMapperBuilderCustomizer. Beans
that implement this interfaces are called during creation of the
auto-configured Jackson2ObjectMapperBuilder, providing an opportunity
to customize its configuration.
Closes gh-5803
The name of a JOOQ SQLDialect does not always match the name defined
in sql-error-codes.xml. For example, the Postgres translator was not
initialized correctly because in JOOQ the dialect is named
SQLDialect.POSTGRES, but in sql-error-codes.xml the bean is named
"PostgreSQL".
This commit updates the translator to use the dialects third-party
springDbName which ensures that it maps correctly to the entries in
sql-error-codes.xml.
Closes gh-5884