294 Commits

Author SHA1 Message Date
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
Phillip Webb
c55b5d7111 Polish 2017-11-01 23:14:52 -07:00
Andy Wilkinson
66b55defa0 Adapt to password encoder changes in Spring Security
Closes gh-10762
2017-10-24 21:50:19 +01: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
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
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
9e43b99966 Polish 2017-09-27 17:44:48 -07:00
Madhura Bhave
7093602753 Simplify UserDetailsService creation in samples
Closes gh-10385
2017-09-26 14:06:19 -07: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
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
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
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
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
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
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
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
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
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
Phillip Webb
06558675bb Polish 2017-04-25 09:45:14 -07:00
Stephane Nicoll
9327b58304 Fixup version numbers following release 2017-04-21 11:26:45 +02:00
Spring Buildmaster
9768b0a8c2 Next Development Version 2017-04-21 08:32:01 +00:00
Madhura Bhave
bcd79dd992 Move all actuators under /application
Context path can be configured via `management.context-path`.

Closes gh-6886
2017-04-14 15:15:44 -07:00
Phillip Webb
c4cba6b0ea Merge branch '1.5.x' 2017-04-11 21:07:51 -07:00
Phillip Webb
d301d0f4c3 Merge branch '1.4.x' into 1.5.x 2017-04-11 20:42:48 -07:00
Phillip Webb
758ddcd420 Polish 2017-04-11 20:17:23 -07:00
Madhura Bhave
971057705d Merge branch '1.5.x' 2017-04-11 15:57:10 -07:00
Madhura Bhave
535451f9e5 Merge branch '1.4.x' into 1.5.x 2017-04-11 15:54:01 -07:00
Madhura Bhave
b2f0ebfcb8 Prevent empty json for parameters in trace endpoint
Fixes gh-8883
2017-04-11 15:30:39 -07:00
Phillip Webb
2de7e9c310 Merge branch '1.5.x' 2017-04-04 10:07:38 -07:00
Phillip Webb
3b93bb46e0 Revert accidental call to .close()
Remove call to `.close()` which was accidentally left in after some
performance testing.
2017-04-04 09:56:03 -07:00
Phillip Webb
ad38776de3 Polish 2017-04-04 09:48:10 -07:00
Andy Wilkinson
47c0c3c0ef Update samples with Gradle configuration to align with new plugin 2017-04-04 15:33:27 +01:00
Phillip Webb
67556ba8ea Restructure embedded web server packages
Rework `org.springframework.boot.context.embedded` to relocate classes
to `org.springframework.boot.web`. Packages are now organized around
the following areas:

Packages for shared concerns, for example the `WebServer` interface
to start/stop a server and the common configuration elements:
- org.springframework.boot.web.context
- org.springframework.boot.web.server

Servlet specific packages:
- org.springframework.boot.web.servlet.server
- org.springframework.boot.web.servlet.context
- org.springframework.boot.web.servlet.filter

Reactive specific packages:
- org.springframework.boot.web.reactive.context
- org.springframework.boot.web.reactive.server

Embedded server implementations (both reactive and servlet):
- org.springframework.boot.web.embedded

In addition:

- Rename `EmbeddedServletContainerFactory` to `ServletWebServerFactory`
  to align with the `ReactiveWebServerFactory`.
- Rename `EmbeddedWebApplicationContext` to
  `ServletWebServerApplicationContext` and
- Rename `EmbeddedReactiveWebApplicationContext` to
  `ReactiveWebServerApplicationContext`.
- Add checkstyle rules to restrict imports.
- Fixup all affected code to use the correct imports and local names.

Fixes gh-8532
2017-03-12 21:08:25 -07:00