Neither Cassandra nor Elasticsearch starts reliably on Windows. This
commit adds a custom class rule to the associated sample application
tests to skip them on Windows. A class rule is used rather than a
Unit assumption as we want to avoid starting Elasticsearch (done by
the application context) and Cassandra (done by a test execution
listener) and an assumption would be too late.
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
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
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
While working on gh-5309, a regression was introduced and fixed right the
way on master. Unfortunately, the fix wasn't applied to `1.3.x` as it
should have been.
This commit applies 6dd8415 to `1.3.x`
Closes gh-5901
ErrorMvcAutoConfiguration creates a BeanNameViewResolver bean in case
the user has used @EnabledWebMvc and disabled WebMvcAutoConfiguration.
If the user hasn’t used @EnabledWebMvc, WebMvcAutoConfiguration will
creates its BeanNameViewResolver and override the one that’s already
been defined by ErrorMvcAutoConfiguration.
This commit makes WebMvcAutoConfiguration’s BeanNameViewResolver
definition conditional on there being no existing BeanNameViewResolver
bean definition.
Closes gh-5354
to stop it from being included in the enclosing @Configuration.
That way, if the app is not a web app, then there really is a
client_credentials OAuth2 resource (as claimed in the user guide).
Fixes gh-5735
Previously, if a void method with a single argument was named "set", the
annotation processor wrongly considered it was a setter candidate. This
commit updates the condition to ignore it.
Closes gh-5826
Rabbit client 3.6.* uses TLSv1.1 as the default algorithm which
many brokers are deisabling these days. Spring AMQP supports
changing the algorithm by name, so this is just a pass thru for
that.
It sometimes has to catch an exception from the security filter so
it needs to be before, and somehow this hasn't been a problem up to
now, but probably only by some fluke.
Fixes gh-5792
Before this change the app context closes and metrics that have not
yet been exported ccan be orphaned. The design of this feature is simple:
use Closeable where possible, so that it will be called automatically
by Spring on shutdown.
Fixes gh-5771
The MetricCopyExporter has had the capability for a while to keep
track of counters internally. This change aligns that with the
PrefixMetricGroupExporter.
Fixes gh-5762
Previously, the web application context was only set on the
ServletContext in a full-blown integration test or when MockMvc was
used.
This commit updates SpringApplicationContextLoader so that the context
is also set on the context in a plain web application test (one where
MockMvc is not being used). The change is a partial backport of commit
7dffb702.
Closes gh-4370