Commit Graph

1492 Commits

Author SHA1 Message Date
Stephane Nicoll
07fa8bcf75 Polish "Add Kafka sample"
Closes gh-11597
2018-02-08 18:39:57 +01:00
xinhc
89e1d95363 Add Kafka sample
See gh-11597
2018-02-08 18:39:57 +01:00
Andy Wilkinson
a09c64e18c Polish 2018-02-08 11:15:36 +00:00
Andy Wilkinson
70c613819d Fix incomplete calls to assertThat 2018-02-08 11:06:54 +00:00
Andy Wilkinson
76a450dfba Format with Eclipse Oxygen SR2 2018-02-08 10:53:53 +00:00
Andy Wilkinson
8605499a64 Provide more control over when the health endpoint shows details
Closes gh-11869
2018-02-07 09:51:19 +00:00
dreis2211
81459efffa Use HTTPS URLs where applicable 2018-02-02 12:03:12 +00:00
Andy Wilkinson
4a1bea1fed Polish 2018-02-01 20:03:02 +00:00
Phillip Webb
09a64bc841 Fixup version numbers following release 2018-01-30 17:16:04 -08:00
Spring Buildmaster
6414b42335 Next Development Version 2018-01-30 23:29:33 +00:00
Andy Wilkinson
356efaa7c8 Rename trace to httptrace
Closes gh-11806
2018-01-30 12:55:27 +00:00
Madhura Bhave
134628a62d Add PathRequest to reactive security for parity 2018-01-29 18:34:46 -08:00
Madhura Bhave
e80c22cbf8 Add RequestMatcher for H2 console
Fixes gh-11704
2018-01-29 18:34:46 -08:00
Phillip Webb
b234501af3 Polish 2018-01-26 11:39:41 -08:00
Kim Rudolph
fd1a7ba77c Migrate spring-boot-sample-web-ui to Bootstrap v4
Closes gh-10653
2018-01-26 17:17:10 +00:00
Phillip Webb
adfb6dc128 Polish 2018-01-25 13:20:29 -08:00
Andy Wilkinson
3565961d68 Rework HTTP exchange tracing and add support for WebFlux
Closes gh-9980
2018-01-25 13:27:07 +00:00
Madhura Bhave
d65f9b25bc Remove redundant throws Exception 2018-01-25 17:25:38 +05:30
Phillip Webb
017efda6ec Add @EndpointServlet and migrate Jolokia
Add first class support for Servlet based endpoints and rework the
Jolokia endpoint to use it.

Fixes gh-10264
2018-01-24 17:06:13 -08:00
Johnny Lim
768e7c07e6 Polish
Closes gh-11720
2018-01-22 16:06:45 -08:00
Phillip Webb
bda9b892b3 Add direct WebFlux and WebMvc endpoint support
Add `@ControllerEndpoint` and `@RestControllerEndpoint` annotations that
can be used to develop a Spring-only request mapped endpoint. Both
Spring MVC and Spring WebFlux are supported.

This feature is primarily for use when deeper Spring integration is
required or when existing Spring Boot 1.5 projects want to migrate to
Spring Boot 2.0 without re-writing existing endpoints. It comes at the
expense of portability, since such endpoints will be missing from
Jersey.

Fixes gh-10257
2018-01-19 21:06:32 -08:00
Phillip Webb
1d39feffea Overhaul actuator endpoint code
Refactor several areas of the actuator endpoint code in order to make
future extensions easier. The primary goal is to introduce the concept
of an `ExposableEndpoint` that has technology specific subclasses and
can carry additional data for filters to use. Many other changes have
been made along the way including:

* A new EndpointSupplier interface that allows cleaner separation of
  supplying vs discovering endpoints. This allows cleaner class names
  and allows for better auto-configuration since a user can choose to
  provide their own supplier entirely.

* A `DiscoveredEndpoint` interface that allows the `EndpointFilter`
  to be greatly simplified. A filter now doesn't need to know about
  discovery concerns unless absolutely necessary.

* Improved naming and package structure. Many technology specific
  concerns are now grouped in a better way. Related concerns are
  co-located and concepts from one area no longer leakage into another.

* Simplified `HandlerMapping` implementations. Many common concerns have
  been pulled up helping to create simpler subclasses.

* Simplified JMX adapters. Many of the intermediary `Info` classes have
  been removed. The `DiscoveredJmxOperation` is now responsible for
  mapping methods to operations.

* A specific @`HealthEndpointCloudFoundryExtension` for Cloud Foundry.
  The extension logic used to create a "full" health endpoint extension
  has been made explicit.

Fixes gh-11428
Fixes gh-11581
2018-01-19 20:44:24 -08:00
Phillip Webb
dc935fba48 Polish 2018-01-19 20:44:18 -08:00
Madhura Bhave
d9ff51ccd3 Add StaticResourceRequest for WebFlux Security
Closes gh-11040
2018-01-20 10:00:08 +05:30
Madhura Bhave
5e2cc02499 Move servlet specific security auto-config 2018-01-20 09:41:50 +05:30
Phillip Webb
f3379668ac Polish 2018-01-18 23:21:51 -08:00
Andy Wilkinson
6fb629227c Fix race condition in SampleQuartzApplicationTests 2018-01-17 20:56:42 +00:00
Stephane Nicoll
51f0d88eec Polish "Add test to spring-boot-sample-quartz"
Closes gh-11621
2018-01-17 14:31:52 +01:00
Eddú Meléndez
5f1f04a33a Add test to spring-boot-sample-quartz
See gh-11621
2018-01-17 14:27:02 +01:00
Andy Wilkinson
5b8a2f9675 Improve context hierarchy handling in Actuator endpoints
Previously, a number of Actuator endpoints ignored a context hierarchy
or assumed that it would always be linear. This commit reworks the
affected endpoints so that the no longer assume a linear hierarchy.

A side-effect of a non-linear hierarchy is that there may be multiple
different beans with the same name (in a linear hierarchy, a bean
with the same name as one in an ancestor context, replaces that bean).
The affected endpoints have also been updated so that, when bean names
are used as keys, those keys are grouped by application context. This
prevents a bean in one context from accidentially overwriting a bean
in another context.

Closes gh-11019
2018-01-16 09:53:52 +00:00
Brian Clozel
22c22a1ced Move server.session.* to server.servlet.session.*
Closes gh-11589
2018-01-15 17:50:32 +01:00
Johnny Lim
77150f8dc9 Polish
Closes gh-11630
2018-01-15 10:20:31 +01:00
Madhura Bhave
e57aafd63d Provide EndpointRequest for WebFlux-based Security
Closes gh-11022
2018-01-09 16:06:36 -08:00
Phillip Webb
b078698f20 Update copyright year of changed files 2018-01-09 12:13:27 -08:00
Phillip Webb
9cb5f3da89 Create DynamicRegistrationBean
Extract functionality from the `RegistrationBean` into a new class
designed to work with dynamic registration. Servet and Filter
registration beans now extend from `DynaimcRegistrationBean`, where as
`ServletListenerRegistrationBean` extends directly from
`RegistrationBean`.

This refactor allows the removal of `ServletListenerRegistrationBean`
deprecated methods.

Fixes gh-11344
2018-01-08 22:05:00 -08:00
Andy Wilkinson
93c5900d47 Merge branch '1.5.x' 2018-01-05 12:06:01 +00:00
Andy Wilkinson
a9811e360a Add missing copyright headers to .java source files 2018-01-05 12:04:34 +00:00
Andy Wilkinson
5bbd31e7a3 Rename test classes so that their tests are run by Maven 2018-01-05 11:49:39 +00:00
Andy Wilkinson
268b97bf98 No-op ResetMocksTestExecutionListener when Mockito is not present
Closes gh-11508
2018-01-05 11:13:36 +00:00
Stephane Nicoll
ac004eabf3 Update copyright header
See gh-11510
2018-01-05 10:30:43 +01:00
Johnny Lim
37d8eedae3 Polish
Closes gh-11510
2018-01-05 10:29:22 +01:00
Madhura Bhave
732d9868e3 Increase session timeout to prevent CI failures 2018-01-03 11:12:41 -08:00
Stephane Nicoll
afba8fed79 Harmonize management.server.context-path property
This commit moves management.server.context-path to
management.server.servlet.context-path to align with the configuration
key for the application's main context path.

Closes gh-11359
2017-12-28 12:08:51 +01:00
Phillip Webb
ed2460b091 Add support for animated GIFs
Update ImageBanner to support animated GIFs. Animations rely on ANSI
cursor codes so don't work so well in an IDE. They do, however, work
when running the app from a terminal.

See also commit 47bc5e71ab

Closes gh-11118
2017-12-13 14:58:11 -08:00
Stephane Nicoll
681fdb1ee8 Property detect Health web extension with management context
Previously, the Health web extension was defined in the management
context and, as a result, it wasn't found when a separate port was
required. The side effect is that anything that the health web extension
does was not active anymore in that case.

This commit makes sure that the extension is always defined as part of
the main context where operations are discovered and merged.

Closes gh-11285
2017-12-13 17:47:18 +01:00
Stephane Nicoll
1fdc1e373c Polish 2017-12-13 15:43:30 +01:00
Stephane Nicoll
23218add90 Polish 2017-12-12 11:57:30 +01:00
Madhura Bhave
47ed096981 Make default username and password configurable
Closes gh-10963
2017-12-11 15:15:47 -08:00
Johnny Lim
6d54072e04 Remove "final" keywords
Closes gh-11294
2017-12-08 11:13:07 -08:00
Brian Clozel
eec7a8f075 Remove Web depedency from Freemarker starter
Now that Spring Boot supports Freemarker for both Spring MVC and Spring
WebFlux, the dedicated starter should not pull the Web starter
transitively and let developers manually choose the web stack.

Closes gh-11246
2017-12-03 11:23:43 -08:00
Stephane Nicoll
8efb608b7e Fixup version numbers following release 2017-11-28 12:28:33 +01:00
Spring Buildmaster
df2ae7aa19 Next Development Version 2017-11-28 09:55:46 +00:00
Stephane Nicoll
dfc0e392ed Polish "Fix references to management related properties"
Closes gh-11091
2017-11-23 10:57:18 +01:00
Vedran Pavic
63aef58d30 Fix references to management related properties
See gh-11091
2017-11-23 10:48:37 +01:00
Phillip Webb
07f71e889e Move /application to /actuator
Change the endpoint default path from `/application` to `/actuator`.

Fixes gh-10970
2017-11-22 23:18:22 -08:00
Phillip Webb
4412285c45 Polish Spring Session WebFlux sample
Closes gh-11055
2017-11-22 22:01:58 -08:00
Vedran Pavic
a8c027ba8e Add Spring Session WebFlux sample
See gh-11055
2017-11-22 22:01:58 -08:00
Phillip Webb
31025d9f6c Drop status endpoint
Drop the status endpoint and merge functionality back into the health
endpoint. The `management.endpoint.health.show-details` property can
be used to change if full details, or just the status is displayed.

Fixes gh-11113
2017-11-22 22:01:58 -08:00
Johnny Lim
73c65286ea Polish 2017-11-18 10:07:30 -08:00
Johnny Lim
1783a072ad Remove explicit constructor super() calls
Closes gh-11068
2017-11-17 16:44:16 -08:00
Madhura Bhave
50a3c2fe2a Rename test to a more suitable name 2017-11-17 12:24:22 -08:00
Madhura Bhave
4a41c02926 Update redirect-uri-template in oauth sample and docs
Fixes gh-11014
2017-11-17 11:29:01 -08:00
Johnny Lim
e8563c54dd Polish
Closes gh-11050
2017-11-17 09:56:16 +01:00
Phillip Webb
fd5c43cdc9 Separate endpoint concerns
Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.

Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a  single endpoint (including enable and cache
time-to-live). These  properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).

The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.

Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.

Fixes gh-10176
2017-11-15 14:41:38 -08:00
Phillip Webb
f647f5689f Polish 2017-11-15 12:47:47 -08:00
Andy Wilkinson
88366b75d0 Reinstate @DirtiesContext on shutdown endpoint test
Closes gh-10548
2017-11-14 18:42:09 +00:00
Stephane Nicoll
512030f4fa Polish "Samples cleanup"
Closes gh-10548
2017-11-14 15:49:56 +01:00
Ivan Sopov
d8fa71bc97 Samples cleanup
- Modifying dependencies to starter-web with tomcat exclusion plus
  alternative servlet container instead of manual dependency on
  spring-webmvc as it is the preferrable way to use alternative servlet
  container
- Previously RestTemplate with ssl was configured manually in tests - now
  it rellies on autoconfiguration - changed this for multi-connector test
  and added test to ensure that ssl autoconfiguration is working
- Most samples with alterntative servlet containers used some kind of
  service reading property and returning default since it wasn't
  configured - removed it, since it is not specific to using alternative
  servlet containers.

See gh-10548
2017-11-14 15:39:27 +01:00
Andy Wilkinson
ec7840e049 Align Actuator sample's tests with endpoint contextId changes
See gh-10980
2017-11-11 21:32:07 +00:00
Andy Wilkinson
07462be090 Polish 2017-11-11 16:29:12 +00:00
Johnny Lim
bd0dcfb172 Utilize StandardCharsets
Closes gh-10972
2017-11-10 09:49:13 +01:00
Andy Wilkinson
60afbdc868 Polish 2017-11-06 11:44:53 +00:00
Phillip Webb
c55b5d7111 Polish 2017-11-01 23:14:52 -07:00
Andy Wilkinson
5aa66305a8 Log warning when open-in-view is implicitly enabled for JPA or Neo4j
Closes gh-7107
2017-10-30 12:37:38 +00:00
Andy Wilkinson
622e65a290 Align simple sample with configuration properties validation change
See gh-8024
2017-10-25 17:54:39 +01:00
Vedran Pavic
ac10fa31cd Upgrade to Hazelcast 3.9
Closes gh-10764
2017-10-25 08:56:35 +02:00
Andy Wilkinson
66b55defa0 Adapt to password encoder changes in Spring Security
Closes gh-10762
2017-10-24 21:50:19 +01:00
Johnny Lim
6168fae720 Remove explicit type arguments
See gh-10494
2017-10-24 14:44:20 +01:00
Stephane Nicoll
59a906bd58 Upgrade Java9 build to AspectJ 1.9.0.RC1 2017-10-24 09:32:34 +02:00
Andy Wilkinson
90ecb29667 Align with spring-security-jwt-jose being renamed to s-s-auth2-jose
Closes gh-10750
2017-10-23 15:58:37 +01:00
Madhura Bhave
80b5da78a1 Fix test failures 2017-10-19 18:23:01 -07:00
Madhura Bhave
8600bd7294 Upgrade to Spring Security 5.0.0.BUILD-SNAPSHOT
Following some changes in the latest snapshot this includes:
- Some updates to oauth2 client auto-config
- Security auto-config no longer relies on GlobalAuthenticationConfigurerAdapter
- Remove reactive security starter

Closes gh-10704
2017-10-19 15:39:01 -07:00
Madhura Bhave
d307eba0a3 Add property to configure base-path for web endpoints.
Also, move properties corresponding to management server under
`management.server.*`.

Closes gh-10230
2017-10-16 15:17:55 -07:00
Stephane Nicoll
00142dc70f Fixup version numbers following release 2017-10-16 16:48:39 +02:00
Spring Buildmaster
c0f9f64776 Next Development Version 2017-10-16 12:36:43 +00:00
Andy Wilkinson
162a48806e Update custom layout sample so it builds with Java 9
Previously, the custom layout sample did not configure the source
and target for the compiler. This meant that both defaulted to 1.5
which is not supported by Java 9's javac. The oldest support version
is 1.6.

This commit sets the maven.compiler.source and maven.compiler.target
properties to 1.8 (the lowest version support by Boot 2.0) allowing
the sample to build with both Java 8 and Java 9.

See gh-10515
2017-10-13 16:22:50 +01:00
Phillip Webb
748e0779b6 Update copyright year for changed files 2017-10-10 11:56:13 -07:00
Phillip Webb
d62d829c19 Polish 2017-10-10 11:55:47 -07:00
Madhura Bhave
ab8aa6bb6c Add README for OAuth2 client sample 2017-10-05 18:30:33 -07:00
Phillip Webb
9ff87612f9 Delete sample Gradle builds
Remove the Gradle builds that were provided with some of the sample
applications since they were never directly invoked.

See gh-9316
2017-10-04 16:34:40 -07:00
Phillip Webb
041d8b39d0 Fix Ant builds following Maven updates
Update `spring-boot-sample-ant` so that it works with the CI friendly
Maven POMs.

See gh-9316
2017-10-04 16:34:40 -07:00
Phillip Webb
2855010841 Fix sample POMs
Update sample POMs to follow CI friendly Maven conventions.

See gh-9316
2017-10-04 16:34:39 -07:00
Phillip Webb
9192444c31 Polish 2017-10-03 18:32:16 -07:00
Madhura Bhave
9f1ed197d2 Update sample with placeholders for oauth client 2017-10-03 13:17:31 -07:00
Madhura Bhave
dbe1d9608d Add auto-config for spring-security-oauth2-client
Closes gh-10497
2017-10-02 14:36:35 -07:00
Andy Wilkinson
5a13a32f6c Revert "Reinstate testing of Jetty JSP sample on Java 9"
This reverts commit bbca612a57.
StandardJarScanner, which contains the faulty assumption about
URLClassLoader is part of Jasper. Jetty, like Tomcat, uses Jasper for
JSPs so it's also affected.

See gh-10456
2017-09-30 09:58:36 +01:00
jfarcand
9dbc3e25bb Upgrade sample to Atmosphere 2.4.14
Closes gh-10447
2017-09-29 16:28:22 +02:00
Andy Wilkinson
bbca612a57 Reinstate testing of Jetty JSP sample on Java 9
See gh-10456
2017-09-29 14:16:38 +01:00
Stephane Nicoll
75dbe5c2de Include java.xml.ws module when running on Java 9
See gh-7226
2017-09-29 12:12:46 +02:00
Stephane Nicoll
5ba2906045 Disable JSP sample tests on Java 9
See gh-10456
2017-09-29 12:07:13 +02:00
Stephane Nicoll
eddf27320f Configuring Surefire for samples when running on Java 9
See gh-7226
2017-09-29 10:59:49 +02:00
Stephane Nicoll
4caeed2ac4 Disable cassandra test on Java 9
See gh-10453
2017-09-29 10:34:46 +02:00
Phillip Webb
9e43b99966 Polish 2017-09-27 17:44:48 -07:00
Madhura Bhave
5d05347e61 Add auto-config and starter for reactive security
Closes gh-9925
2017-09-26 19:36:48 -07:00
Madhura Bhave
7093602753 Simplify UserDetailsService creation in samples
Closes gh-10385
2017-09-26 14:06:19 -07:00
Vedran Pavic
bb72a4abe1 Add support for Spring WS auto WSDL/XSD exposure
This commit adds support for auto-configuration of Spring WS automatic
WSDL and XSD exposure i.e. registration of `WsdlDefinition` and
`XsdDefinition` beans. The bean registration is triggered by configuring
`spring.webservices.wsdl-locations` property which will search the
provided locations for WSDL/XSD files and register appropriate beans.

See gh-9635
2017-09-25 15:21:08 +02:00
Vedran Pavic
a39ccc2f8c Add MongoDB support to Spring Session sample
Closes gh-10374
2017-09-22 07:25:23 +02:00
Andy Wilkinson
c3bc32db02 Polish and reinstate usage of FileSystemUtils.deleteRecursively
Closes gh-9942
2017-09-21 12:03:51 +01:00
Andy Wilkinson
e9147c2f20 Remove Spring Security OAuth Auto-Configuration
This commit removes auto-configuration support for Spring Security
OAuth, paving the way for the introduction of auto-configuration for
Spring Security 5's new OAuth-related features.

Closes gh-10255
2017-09-21 10:33:16 +01:00
Stephane Nicoll
27f22229e2 Polish "Add actuator endpoint for finding and deleting sessions"
Closes gh-8342
2017-09-20 16:17:06 +02:00
Vedran Pavic
cf151b1717 Add actuator endpoint for finding and deleting sessions
See gh-8342
2017-09-20 15:48:25 +02:00
Andy Wilkinson
8ab12d909e Use standard bean validation annotations that are new in 2.0
See gh-9969
2017-09-20 12:08:13 +01:00
Stephane Nicoll
efc3188cff Polish "Improve Spring Session sample"
Closes gh-10351
2017-09-20 11:09:44 +02:00
Vedran Pavic
8561929164 Improve Spring Session sample
This commit improves the Spring Session sample by providing multiple
build profiles that make it possible to easily try out different session
stores. By default, JDBC session store backed by an in-memory embedded H2
database is used.

See gh-10351
2017-09-20 11:08:46 +02:00
Andy Wilkinson
0f25dd0ea6 Update Failsafe and Surefire Maven plugins to 2.20.1
Closes gh-9414
2017-09-19 21:31:24 +01:00
Stephane Nicoll
8c0ffa331b Polish
See gh-9969
2017-09-19 18:45:08 +02:00
Stephane Nicoll
d89ff8cb28 Polish sample
Closes gh-10330
2017-09-19 17:03:27 +02:00
Jon Schneider
c2958c27ab Replace Boot's own metrics with support for Micrometer
Closes gh-9970
2017-09-14 17:15:46 +01:00
Stephane Nicoll
e05e04014b Move security.* to spring.security.*
This commit also removes `security.basic.enabled` as this property is
no longer required.

Closes gh-10296
2017-09-14 17:33:37 +02:00
Stephane Nicoll
8010f6ef00 Rationalize JUnit5 dependency management
This commit only provides dependency management for JUnit Jupiter,
excluding experimental and migration support artifacts. It also removes
dependency management for the platform as it is used by IDEs and build
tools). The `junit-platform.version` is still available though to allow
users to configure their plugin with a supported placeholder for the
version.

Also, given that `junit-vintage-engine`'s version does not match the
JUnit 4 version it supports, we will not add dependency management for
it.

Closes gh-10240
2017-09-14 11:47:36 +02:00
Stephane Nicoll
eb4a9d87fd Add actuator to jersey sample
Closes gh-10259
2017-09-13 12:46:43 +02:00
Stephane Nicoll
b5d8e072f1 Add actuator to webflux sample
Closes gh-10258
2017-09-13 12:11:20 +02:00
Stephane Nicoll
73f4a2e130 Remove unnecessary override 2017-09-13 12:03:10 +02:00
Stephane Nicoll
a825e9f493 Polish 2017-09-13 12:00:43 +02:00
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
2017-09-13 11:20:34 +02:00
Brian Clozel
1669e4bad3 Fixup version numbers following release 2017-09-12 14:28:47 +02:00
Spring Buildmaster
30eb937a83 Next Development Version 2017-09-12 10:54:22 +00:00
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
2017-09-12 00:11:29 -07:00
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
2017-09-12 00:11:20 -07:00
Phillip Webb
0f99b29b1a Temporarily remove security matchers
Temporarily back out `SpringBootSecurity` to enable easier
package refactoring.

See gh-10261
2017-09-12 00:02:34 -07:00
Phillip Webb
ecb8461e8c Manually format security configuration
Update security configuration formatting to follow conventions
recommended in the Spring Security documentation.

See gh-7958
2017-09-11 23:58:52 -07:00
Stephane Nicoll
1dc08fdda2 Polish "Provide dependency management for JUnit Jupiter"
Closes gh-10240
2017-09-11 20:21:21 +02:00
Eddú Meléndez
bb4a8cdc0e Provide dependency management for JUnit Jupiter
Spring Framework 5 provides support for JUnit 5. This commit adds
dependency management for JUnit 5 and an upgrade for
spring-boot-sample-junit-jupiter sample.

See gh-10240
2017-09-11 20:03:26 +02:00
Andy Wilkinson
ad4ce9cf57 Return objects from trace, audit event, and thread dump endpoints
Closes gh-7648
2017-09-05 12:13:25 +01:00
Andy Wilkinson
a6b30a3aab Reflect context hierarchy in beans endpoint’s response structure
Closes gh-10156
2017-09-05 12:13:25 +01:00
Andy Wilkinson
ab54801143 Improve structure of response from configprops endpoint
Closes gh-10162
2017-09-05 12:13:25 +01:00
Andy Wilkinson
9242def4c0 Improve structure and JSON serialization of beans endpoint's response
Closes gh-10156
2017-09-04 14:40:15 +01:00
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
2017-08-30 12:42:24 +02:00
Stephane Nicoll
b91ceef621 Polish "Polish"
Closes gh-10109
2017-08-30 10:41:51 +02:00
Johnny Lim
db76112700 Polish
See gh-10109
2017-08-30 10:33:53 +02:00
Phillip Webb
2c97d3a5e9 Polish 2017-08-29 15:59:32 -07:00
Stephane Nicoll
98455e30dc Rename default endpoint settings to "default"
Closes gh-10098
2017-08-29 11:27:35 +02:00
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
2017-08-28 15:53:35 -07:00
Stephane Nicoll
da65158eae Disable Jolokia by default
To be consistent with Actuator web endpoints, Jolokia is now disabled
by default.

Closes gh-10090
2017-08-28 10:18:19 +02:00
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
2017-08-27 23:15:18 -07:00
Stephane Nicoll
08ce7e24d7 Polish 2017-08-25 13:56:37 +02:00
Stephane Nicoll
68fcea7b9a Migrate endpoints.cors to management.endpoints.cors
This commit moves CORS properties out of the endpoints namespace as they
do not refer to a "cors" endpoint but rather to the CORS configuration
of all endpoints.

Closes gh-10053
2017-08-22 11:40:39 +02:00
Andy Wilkinson
ee16332745 Update Actuator to use the new endpoint infrastructure
This commit migrates the Actuator onto the new endpoint infrastruture.
In addition to the existing support for accessing the endpoints via
JMX and HTTP using Spring MVC, support for access via HTTP using
Jersey and WebFlux has been added. This includes using a separate
management port where we now spin up an additional, appropriately
configured servlet or reactive web server to expose the management
context on a different HTTP port to the main application.

Closes gh-2921
Closes gh-5389
Closes gh-9796
2017-08-11 16:38:41 +01:00
Andy Wilkinson
0aa39d0279 Improve the package structure of spring-boot-actuator module
Closes gh-7545
2017-08-10 12:08:01 +01:00
Andy Wilkinson
5aae23d8ea Update OAuth Actuator sample tests to adapt to sensitivity removal
See gh-9924
2017-08-01 12:44:08 +01:00
Andy Wilkinson
52536dc291 Update Actuator UI sample test to adapt to sensitivity removal
See gh-9924
2017-08-01 11:12:33 +01:00
Andy Wilkinson
bb55f49396 Remove concept of sensitivity from Actuator's endpoints
Closes gh-9924
2017-08-01 10:05:09 +01:00
Andy Wilkinson
847f6d1b2c Update test in Actuator sample to adapt to changes in env response
See gh-9864
2017-08-01 09:03:23 +01:00
Andy Wilkinson
4f76a560b8 Fix the Actuator sample 2017-07-31 08:47:16 +01:00
Andy Wilkinson
9f75da9a8f Simplify the Actuator's hypermedia support
This commit replaces the Acuator's support for hypermedia with a
single endpoint that returns HAL-formatted links to all of the
available endpoints. This is done without requiring Spring HATEOAS
to be on the classpath in a similar manner to the existing
CloudFoundry discovery endpoint.

Closes gh-9901
2017-07-30 22:43:05 +01:00
Andy Wilkinson
fb3d79c750 Drop support for self-hosted Actuator docs
Closes gh-9899
2017-07-29 09:19:53 +01:00
Andy Wilkinson
6f864c6210 Fix up version numbers following release 2017-07-27 09:52:16 +01:00
Spring Buildmaster
17a5bb0be4 Next development version 2017-07-27 08:00:21 +00:00
Stephane Nicoll
75fc0c38c8 Merge branch '1.5.x' 2017-07-26 13:39:25 +02:00
Johnny Lim
fe1eb8b5f3 Polish
See gh-9855
2017-07-26 13:39:00 +02:00
Andy Wilkinson
39b4270b7e Fix up version numbers following release 2017-07-26 10:40:35 +01:00
Spring Buildmaster
41c5c0e7c9 Next development version 2017-07-26 08:30:55 +00:00
Stephane Nicoll
dbce7d8935 Polish "Add JUnit Jupiter sample application"
Closes gh-8048
2017-07-25 09:51:47 +02:00
Eddú Meléndez
f1664db85e Add JUnit Jupiter sample application
See gh-8048
2017-07-25 09:51:47 +02:00
Phillip Webb
9db72450da Merge branch '1.5.x' 2017-07-19 10:23:23 -07:00
Phillip Webb
68910f2b8f Polish 2017-07-19 10:21:06 -07:00
Stephane Nicoll
e8566c8764 Merge branch '1.5.x' 2017-07-19 15:24:25 +02:00
Raja Kolli
931eca188e Fix JOOQ sample's compiler configuration
Closes gh-9672
2017-07-19 14:44:07 +02:00
Phillip Webb
a57e6495dd Migrate from FileSystemUtils.deleteRecursively
Update test to migrate away from the now deprecated FileSystemUtils.
2017-07-18 20:22:24 -07:00
Madhura Bhave
ecaa6340e2 Update path in actuator sample tests 2017-07-17 19:22:33 -07:00
Madhura Bhave
b58923a42d Merge branch '1.5.x' 2017-07-17 11:27:08 -07:00
Madhura Bhave
0f8a819af9 Enable cors in default management security config
Fixes gh-9548
2017-07-17 10:49:48 -07:00
Johnny Lim
360e3a492c Polish
closes gh-9729
2017-07-12 13:25:19 +02:00
Phillip Webb
8e3baf3130 Polish 2017-07-11 13:57:21 -07:00
Stephane Nicoll
fa71051ec6 Polish "Upgrade to Infinispan 9.0.3.Final"
Closes gh-9688
2017-07-08 15:30:13 +02:00
Andy Wilkinson
f26f8176b6 Start building against Spring Session 2.0 snapshots
See gh-9541
2017-06-23 10:00:05 +02:00
Eddú Meléndez
b1f96a4641 Improve sample to use fragment expression by thymeleaf 3
Avoid repeated title text making use of capabilities in thymeleaf 3.

Closes gh-9561
2017-06-22 09:50:28 +02:00
Andy Wilkinson
991314c63d Merge branch '1.5.x' 2017-06-16 09:13:42 +01:00
Andy Wilkinson
59122358d3 Clean up and format code 2017-06-16 08:58:14 +01:00
Andy Wilkinson
4a030d5a7a Drop support for auto-configuring an embedded Elasticsearch node
Elastic have announced [1] that embedded Elasticsearch is no longer
supported. This commit brings us into line with that announcement by
removing the auto-configuration that would create an Elasticsearch
Node and NodeClient.

To use the Elasticsearch auto-configuration, a user must now provide
the address of one or more cluster nodes
(via the spring.elastisearch.cluster-nodes property) which will then
be used to create a TransportClient.

See gh-9374

[1] https://www.elastic.co/blog/elasticsearch-the-server
2017-06-15 19:52:24 +01:00
Andy Wilkinson
f7e9ec5f42 Minimise our usage of SocketUtils.findAvailableTcpPort
Closes gh-9382
2017-06-09 14:45:09 +01:00
Stephane Nicoll
aa083996f9 Fixup version numbers following release 2017-06-08 17:38:11 +03:00
Spring Buildmaster
05d4d0281c Next Development Version 2017-06-08 12:47:16 +00:00
Stephane Nicoll
6b1d06cf09 Fixup version numbers following release 2017-06-08 13:46:33 +03:00
Spring Buildmaster
88e43c8421 Next Development Version 2017-06-08 09:52:43 +00:00
Andy Wilkinson
f4c9ab78b2 Fix WebFlux sample's reactor-test dependency
See gh-9427
2017-06-07 16:53:16 +01:00
Stephane Nicoll
040c12bc85 Merge branch '1.5.x' 2017-06-07 18:42:40 +03:00
Stephane Nicoll
fc38c1ba4d Improve cache sample
Clarify the cache sample and in particular that Infinispan does not
bootstrap with a default configuration file. Hence the custom
`infinispan.xml` configuration is enabled by default if Infinispan is
available on the classpath.

See gh-9417
2017-06-07 18:41:38 +03:00
Stephane Nicoll
7f420d1268 Polish contribution
Closes gh-9411
2017-06-06 10:52:31 +02:00
Vedran Pavic
db060c847d Ensure QuartzDatabaseInitializer is initialized before Scheduler
If the auto-configured `Scheduler` instance backed by JDBC job store is
used as a dependency in an application component, the initialization of
`Scheduler` will be triggered before `QuartzDatabaseInitializer`. This
will result in failure due to schema not being prepared in time for
`Scheduler` to populate job details.

This commit ensures `QuartzDatabaseInitializer` is initialized before the
auto-configured `Scheduler` by introducing a dependency between the two.

See gh-9411
2017-06-06 10:14:49 +02:00
Phillip Webb
2c7dd9f519 Polish 2017-06-02 16:00:39 -07:00
Stephane Nicoll
90498a0b2f Fix broken build 2017-06-02 17:58:14 +02:00
Stephane Nicoll
59a15b259c Polish "Add Quartz Scheduler support"
Closes gh-4299
2017-05-30 18:48:12 +02:00
Vedran Pavic
9e23206c31 Add Quartz Scheduler support
See gh-4299
2017-05-30 18:48:12 +02:00
Madhura Bhave
d745b69630 Replace usages of EnvironmentTestUtils 2017-05-24 14:59:04 -07:00
Brian Clozel
fed8c8a681 Adapt WebFlux.fn auto-config to SPR-15536
Since SPR-15536, WebFlux.fn is now configured with `@EnableWebFlux`,
along the annotated controllers. Both `RouterFunction` and Controller
instances can now live within the same application and they share
the same web infrastructure.

This commit removes the custom auto-configuration for `RouterFunction`
and relies on `@EnableWebFlux` for that.

Closes gh-9165
2017-05-24 14:54:05 +02:00
Mark Paluch
7e8e2c486e Adapt to relocated packages in Spring Data Cassandra
See gh-9291
2017-05-24 11:11:36 +01:00
Andy Wilkinson
d5438c299c Polish "Use try-with-resources to close resources automatically"
- Apply code formatting
- Use try-with-resources in many other places that were missed in the
  pull request

Closes gh-8045
2017-05-23 19:38:48 +01:00
Stephane Nicoll
d0670d5b95 Fix reference to actuator endpoints
Closes gh-9247
2017-05-17 10:15:09 +02:00
Phillip Webb
889d43ddc4 Refine SpringApplication source types
Update `SpringApplication` so that the `run` methods and constructors
now require `Class<?>` arguments, rather than `Objects`. String based
sources can still be loaded, but must now be set on the `getSources()`
collections. `Package` and `Resource` types are no longer directly
supported.

This change should help IDEs offer better content assist, and will
help integrations with alternative languages such as Ceylon.

Users currently passing in Class references or using the
`spring.main.sources` property should not be affected by this change. If
an XML resource is being used, some refactoring may be required (see the
changes to `SampleSpringXmlApplication` in this commit).

Fixes gh-9170
2017-05-15 20:35:29 -07:00