Commit Graph

3036 Commits (a825e9f49375adfdb0219fe732cb190479e32245)

Author SHA1 Message Date
Stephane Nicoll 4670cc7795 Relax use of spring.session.store-type
This commit makes the "spring.session.store-type" property optional,
adding an additional check when it is not present that validates only
one supported implementation is available on the classpath.

As Spring Session has been modularized, the chance that multiple
implementations are available on the classpath are lower. When only
one implementation is present, we attempt to auto-configure it. When
more than one implementation is present and no session store is
configured, a NonUniqueSessionRepositoryException is thrown.

Closes gh-9863
7 years ago
Andy Wilkinson 6671a19cef Rework Lettuce configuration to use new client pooling config API
Closes gh-9538
7 years ago
Andy Wilkinson 02bc73b8e1 Polish 7 years ago
Andy Wilkinson 3882552b43 Polish 7 years ago
Phillip Webb 46dfe38b60 Rework security request matchers
Update the security request matchers so that a bean is no longer needed
when the matcher is used. Matchers can now be build by starting from
the `EndpointRequest` or `StaticResourceRequest` classes. For example:

http.authorizeRequests()
  .requestMatchers(EndpointRequest.to("status", "info")).permitAll()
  .requestMatchers(EndpointRequest.toAnyEndpoint()).hasRole("ACTUATOR")
  .requestMatchers(StaticResourceRequest.toCommonLocations()).permitAll()

Closes gh-7958
7 years ago
Phillip Webb 2e51b48cd9 Refactor actuator package locations
Restructure actuator packages to improve structure. The following
changes have been made:

 - Separate actuator and actuator auto-configuration into different
   modules.
 - Move endpoint code into `spring-boot-actuator`.
 - Move `Endpoint` implementations from a single package into
   technology specific packages.
 - Move `HealthIndicator` implementations from a single package into
   technology specific packages.
 - As much as possible attempt to mirror the `spring-boot` package
   structure and class naming in `spring-boot-actuator` and
   `spring-boot-actuator-autoconfigure`.
 - Move `DataSourceBuilder` and DataSource meta-data support from
   `spring-boot-actuator` to `spring-boot`.

Fixes gh-10261
7 years ago
Phillip Webb 0f99b29b1a Temporarily remove security matchers
Temporarily back out `SpringBootSecurity` to enable easier
package refactoring.

See gh-10261
7 years ago
Stephane Nicoll 1cd3b0cabe Remove auto-configuration for MapSessionRepository
This commit removes auto-configuration for Spring Session's simple in
memory support.

Closes gh-10253
7 years ago
Stephane Nicoll 6de364f2df Configure SessionRepositoryFilter with a custom SessionRepository
This commit makes sure that customizations on the
SessionRepositoryFilter are also applied when the user provides its
own SessionRepository.

Closes gh-10254
7 years ago
Stephane Nicoll b8eff0a0f6 Migrate tests to ApplicationContextRunner 7 years ago
Andy Wilkinson d92bc902b6 Merge branch '1.5.x' 7 years ago
Andy Wilkinson 5938df52ea Stop auto-config of MethodValidationPP triggering early init
Previously, if a user's configuration class provided a custom
Validator bean, that configuration class would be initialized very
early so that the Validator could be used to create the
auto-configured MethodValidationPostProcessor. This early
initialization could problems as it may prevent any of the
configuration class's dependencies from being post-processed.

This commit updates the injection of the Validator bean to be lazy,
thereby preventing the creation of the auto-configured
MethodValidationPostProcessor from triggering early initialization.

Closes gh-9416
7 years ago
Stephane Nicoll 46470b5196 Remove outdated additional metadata 7 years ago
Andy Wilkinson 2e19f0b3e5 Upgrade to Jersey 2.26
Closes gh-10217
7 years ago
Stephane Nicoll afc3fc50dc Merge branch '1.5.x' 7 years ago
Stephane Nicoll db18abc542 Fix Elasticsearch template condition if no client is defined
This commit makes sure to backoff if a Client bean is not available.

Closes gh-10143
7 years ago
Stephane Nicoll 5fc01880bc Polish 7 years ago
Johnny Lim 30262e3bc1 Polish
Closes gh-10168
7 years ago
Brian Clozel 27c1b5eb4c Add "onClass" condition on web server auto-configurations
This commit adds new Conditional annotations on auto-configurations
creating the Servlet/Reactive web servers. These conditions only depend
on request primitives used by the servers themselves and aren't
framework specific.

Closes gh-10163
7 years ago
Stephane Nicoll 2d79d63a9d Resume building against Spring Framework 5 snapshots
See gh-10123
Closes gh-9949
7 years ago
Andy Wilkinson 8df852bf71 Change default order of AutoConfigureOrder to 0
Previously, AutoConfigureOrder defaulted to Ordered.LOWEST_PRECEDENCE.
This made is impossible for an individual auto-configuration to
indicate that it wanted to go "last", i.e. after any
auto-configuration classes that didn't not specify an order, or
specified an order other than LOWEST_PRECEDENCE.

This commit changes to default to 0, allowing a single
 auto-configuration to easily indicate that it should go last.

 Closes gh-10142
7 years ago
Phillip Webb 80f023f996 Polish 7 years ago
Andy Wilkinson 7fc12bc8a3 Polish 7 years ago
Stephane Nicoll afda0ec129 Default Hibernate DDL auto to none with Flyway/Liquibase
This commit adds a strategy interface to specific if a given DataSource
has its schema managed. The Hibernate auto-configuration uses it to set
it to "none" if a mechanism to initialize the DataSource is
found and "create-drop" otherwise.

Both Flyway and Liquibase implements that strategy interface and
register it in the context accordingly.

Closes gh-9262
7 years ago
Johnny Lim db76112700 Polish
See gh-10109
7 years ago
Phillip Webb 2c97d3a5e9 Polish 7 years ago
Madhura Bhave 64ffcfc83f Document JWK property
Closes gh-10022
7 years ago
Stephane Nicoll 26b93e9454 Polish
See gh-10084
7 years ago
Stephane Nicoll 1897d76cda Merge branch '1.5.x' 7 years ago
Paul Vorbach 04ca7f137d Identify and fix incomplete assertions
Several calls to assertThat lacked a following assertion most often due
to wrong use of parenthesis.

See gh-10084
7 years ago
Johnny Lim 118f65556f Remove unused ExpectedExceptions
Closes gh-10101
7 years ago
Stephane Nicoll f52003f9ed Merge branch '1.5.x' 7 years ago
Madhura Bhave d03b8e14f1 Fix Windows test failures 7 years ago
Madhura Bhave 919dfd3f90 Remove unused properties and constants
Since the autoconfig totally backs off in the presence
of a WebSecurityConfigurerAdapter, there is no need to
order them ahead of/after the one provided by Spring Boot.

See gh-7958
7 years ago
Stephane Nicoll f6134a8862 Polish 7 years ago
Madhura Bhave 9b5e5f32e1 ClientId not always required for client credentials
Fixes gh-10013
7 years ago
Madhura Bhave e08ddbf838 Rework security autoconfiguration
This commit combines security autoconfigurations for
management endpoints and the rest of the application. By default,
if Spring Security is on the classpath, it turns on @EnableWebSecurity.
In the presence of another WebSecurityConfigurerAdapter this backs off
completely. A default AuthenticationManager is also provided with a user
and generated password. This can be turned off by specifying a bean of
type AuthenticationManager, AuthenticationProvider or UserDetailsService.

Closes gh-7958
7 years ago
Stephane Nicoll 77edebe094 Polish
Closes gh-10076
7 years ago
Stephane Nicoll 0d7cde7a5d Add deprecated metadata for Neo4j
See gh-10076
7 years ago
Stephane Nicoll 8a12a6ce36 Add deprecated metadata for Thymeleaf
See gh-10076
7 years ago
Stephane Nicoll 64231eaa9e Add deprecated metadata for Sendgrid
See gh-10076
7 years ago
Stephane Nicoll b57e66fbe5 Add deprecated metadata for Redis pool
See gh-10076
7 years ago
Stephane Nicoll b2950b568c Add deprecated metadata for datasource initialization
See gh-10076
7 years ago
Stephane Nicoll b574e5c1e6 Add deprecated metadata for Hibernate
See gh-10076
7 years ago
Stephane Nicoll dde652781e Add deprecated metadata for multipart
See gh-10076
7 years ago
Stephane Nicoll 1fefe24de8 Add deprecated metadata for server-related properties
See gh-10076
7 years ago
Stephane Nicoll 88656b31c9 Add deprecated metadata for Liquibase
See gh-10076
7 years ago
Stephane Nicoll e5c5fe9fc5 Add deprecated metadata for Flyway
See gh-10076
7 years ago
Stephane Nicoll 0a7a4c60aa Remove deprecated `error.path` property 7 years ago
Stephane Nicoll 4dc5022203 Polish 7 years ago