Add additional @ConditionalOnMissingBean guards to session
configurations to ensure that the first wins. Also reorder imports
to prefer Redis over JDBC.
See gh-5158
This implementation was inspired in large part by the cache
auto-configuration. In addition to the originally supported Redis, now
Hazelcast, an in-memory map, as well as a no-op option are supported. It
should be easy to extend this to include additional data stores in the
future.
Closes gh-3811
`JedisConnectionFactory` needs `commons-pool2` for quite some time now
and our auto-configuration had a special case to handle redis if
`commons-pool2` isn't available.
This commit removes that code as using it would lead to a failure anyway.
Closes gh-5718
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
Allow convention based status error pages. Static HTML or templates
can be used by placing the appropriately named file under a `/error`
folder. For example:
/src/main/resource/templates/error/404.ftl
or /src/main/resource/public/error/404.html
Pages can also be named after the status series (5xx or 4xx).
Fixes gh-2691
Create ErrorPageRegistry and ErrorPageRegistrar interfaces that allow
error page registration to be a first class concern.
Prior to this commit ErrorPageFilter needed to implement
ConfigurableEmbeddedServletContainer in order to receive ErrorPage
registrations.
Closes gh-5789
Reorganize web related classes for better separation of concerns.
Mainly this involves moving classes from `o.s.b.context.embedded`
that aren't directly tied to embedded servlet containers to
`o.s.b.web` and relocating everything from `o.s.b.context.web`.
See gh-5822
Move the @LocalServerPort to org.springframework.boot.context.embedded
since it's only really useful when working with embedded servlet
containers.
See gh-5822
When Spring Security and its spring-security-test module are on the
classpath, `@WebMvcTest` will now auto-configure Spring Security and
configure its MockMvc-based test support. This behaviour can be
disabled using the new secure attribute on `@WebMvcTest` and
`@AutoConfigureMockMvc`.
Closes gh-5476
Previously, when @AliasFor was used, the value of the mapped property
would be incorrect as the value of the canonical attribute would be
used, rather than the value of the alias.
This commit updates AnnotationsPropertySource to use a merged annotation
as the source of attribute values, thereby ensuring that any aliased
attributes are configured correctly.
Closes gh-5821
Previously, meta-annotations were not considered when looking for
annotations that may have property mappings but were considered when
looking for a `@PropertyMapping` annotation. This led to three
problems:
1. Properties that should have been included in the property source
were not included
2. Properties that were included may have had the wrong name
3. Properties were included when they should not have been
`@DataJpaTests` provided a concrete example of all three problems:
1. The `replace` and `connection` attributes from
`@AutoConfigureTestDatabase` were not included in the property
source
2. The `showSql` attribute from `@DataJpaTest` was mapped as
`spring.test.database.spring.jpa.show-sql`
3. The `useDefaultFilters` attribute from `@DataJpaTest` was included
in the property source.
This commit updates AnnotationsPropertySource to consider
meta-annotations when looking for attributes that should be mapped.
This addresses the first problem. Furthermore,
AnnotationsPropertySource has been updated to no longer consider
meta-annotations when looking for a type-level property mapping.
This addresses the second and third problems.
Closes gh-5794
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.
Add an additional property to LogFileMvcEndpoint to allow log files to
be read from an external location. This is helpful when a launch.script
is used to start the boot-application and the logfile is written by a
redirect of stdout/stderr.
Fixes gh-4255
Closes gh-4836