Commit Graph

46 Commits

Author SHA1 Message Date
Greg Turnquist
9ab2f98df0 Tune expected exceptions to support more platforms
It appears that some machines break when looking for ConnectionException,
but not SocketException, both of which are IOExceptions. This seems to make
tests pass on more machines without compromising the intentions of the API.

[BS-162]
2013-06-17 18:44:10 -07:00
Phillip Webb
8c347fc99b Numerous changes to actuator
Numerous changes to the actuator project, including:
- Specific Endpoint interface
- Spring MVC/Enpoint adapter
- Management server context changes
- Consistent auto-configuration class naming
- Auto-configuration ordering
- Javadoc, code formatting and tests
2013-06-12 15:42:56 -07:00
Phillip Webb
ced99ff18c Polish pom.xml
Polish pom.xml formatting and pull version numbers into parent pom
when possible.
2013-06-12 15:42:55 -07:00
Dave Syer
4923717524 Fix for Security snapshots 2013-06-12 05:59:50 +01:00
Dave Syer
4ee6a90edd [bs-148] Add /env endpoint for Spring Environment
Any enumerable property source is enumerated.  Plus all
properties are available through /env/{name}.

[Fixes #51141441]
2013-06-07 13:29:35 +01:00
Dave Syer
6c5f9a5961 [bs-150] Add HTML error page to Actuator UI apps
The ErrorEndpoint now handles text/html requests differently, delegating
to a View named "error". This view will not exist by default so the user
will see an ugly 500 error, but it's easy to fix and there isn't a good
to provide a default.

[Fixes #51214943]
2013-06-07 12:46:04 +01:00
Dave Syer
7ca2a18ab9 [bs-138] Add explicit @Order to auto security filter
Now users can provide a fallback filter with default @Order
and it won't affect the operation of the default secure endpoints.

[Fixes #50721675]
2013-06-07 09:11:10 +01:00
Dave Syer
a7ea0f643a Updates for Spring Security snapshots 2013-06-07 07:29:54 +01:00
Dave Syer
e011312c68 [bs-138] Make it easy to secure only the management endpoints
Example: web UI with publicly available static assets

    # application.properties:
    security.ignored: /css/**,/script/**

Example: web UI with publicly available everything, but secure
management endpoints.

    # application.properties:
    # Empty path for basic security (default is /**)
    security.basic.path=

[Fixes #50721675]
2013-06-06 22:10:20 +01:00
Dave Syer
e60efc7e55 [bs-17], [bs-146] Add some ApplicationContextInitializers
* One for Cloud Foundry and one for the application context ID
* If app runs in Cloud Foundry vcap.application.* and vcap.services.*
will be populated in the Environment
* The ApplicationContext ID is set to something supposedly unique
(e.g. name:index in a Cloud Foundry app)

[#50968415] [#48153639]
2013-06-04 16:33:20 +01:00
Dave Syer
a6c03e72e6 [bs-138] Add categories (secure,open) to EndpointsProperties 2013-06-03 09:48:40 +01:00
Phillip Webb
a4aef0e0e9 [bs-52] Allow war files to run in place
Update AbstractEmbeddedServletContainerFactory to detect the document
root from a classically packaged war file.

[#48386505] [bs-52] Support for running "traditional" webapps in place
2013-06-02 12:24:51 -07:00
Phillip Webb
7e3c158f3a Polish 2013-05-31 12:26:30 -07:00
Dave Syer
f12b3fbcd7 [bs-143] Add LiveBeansView to Actuator app on /beans
As per standard LiveBeansView features, if spring.liveBeansView.mbeanDomain
is set in the Environment, then all application contexts are displayed,
otherwise only the local one.  Only JSON is served (via produces=).

[Fixes #50879457]
2013-05-31 13:59:50 +01:00
Dave Syer
6c22e0ab6e [bs-140] Extract framework-provided @ConfigurationProperties into @Bean
Allows @ConfigurationProperties beans to be declared explicitly (to set default values)

[#50804109]
2013-05-31 13:02:30 +01:00
Dave Syer
3ba5f56808 [bs-138] Add @OnManagementContext for management beans
User adds @OnManagementContext to a bean or @Configuration and
it should be included in the management context (if there is one)
whether it is the main context or a child.

Makes it easy to secure the management endpoints and keep
the rest open (see actuator-ui-sample).

[#50721675]
2013-05-30 08:43:50 +01:00
Dave Syer
35a376b403 Fix bug in test 2013-05-24 12:02:03 +01:00
Dave Syer
514cf3dcc1 [bs-129] Split up SecurityConfiguration and makes bits of it optional
* Added security.basic.* and security.sessions
* Also security.enabled (so you can switch it off on command line)

[Fixes #50181269]
2013-05-24 06:01:40 +01:00
Dave Syer
e649ef44cc [bs-107] Finish off varz->metrics
[Fixes #49496887] [bs-107] Remove trailing "z" from management endpoint URLs
2013-05-23 19:26:25 +01:00
Dave Syer
b7c0e3279e [bs-22] Add loads of actuator tests
Discovered a few issues along the way and refactored
accordingly.

[#48127729] [bs-22] Add missing unit tests
2013-05-23 18:37:48 +01:00
Dave Syer
19d8315639 Update for Spring Security snapshot 2013-05-23 14:22:08 +01:00
Dave Syer
5f7f69ad93 [bs-132] Actuator should use delegating version of MVC support
The delegating version delegates to other configurers, and it's what
@EnableWebMvc uses.  You effectively switch off the delegation if you
use the base class by mistake.

[Fixes #50267017] [bs-132] Static resources in /css/**
cannot be served by Actuator project
2013-05-22 18:23:25 +01:00
Dave Syer
a700ed4479 [bs-133] Move ServerProperties to spring-bootstrap core
[Fixes #50345533]
2013-05-22 13:08:12 +01:00
Dave Syer
bd5fea0d8c Updates for Security snapshots 2013-05-18 16:38:48 +01:00
Dave Syer
6d21ff71ba Add some dependencies to starters 2013-05-16 12:13:53 +01:00
Dave Syer
728b4887c1 [bs-107] Remove "z" suffix from management endpoints
* /varz->/metrics
* /healthz->/health
* all actuator endpoints are now in a subpackage

[Fixes #49496887]
2013-05-15 16:13:23 +01:00
Dave Syer
53078c320e [bs-118], [bs-119]: add UI builder features
* MessageSource created automatically (location
spring.messages.basename:messages)
* Thymeleaf configured automatically to look for
templates in classpath:/templates
* Added static resource handlers for classpath:/static
and classpath:/

[Fixes #49832165] [bs-118] Support for thymeleaf templates
2013-05-15 15:58:18 +01:00
Dave Syer
6fb8ae3d3b Add brief description of resource filtering 2013-05-12 21:58:54 +01:00
Dave Syer
ef5c8aa304 [bs-115] Add EmbeddedServletContainerCustomizer as a callback
* All instances are called before the container is started in
 a bean post processor
* Users still have to be careful because the customizer is
called very early in the ApplicationContext lifecycle (e.g.
might have to do a lookup for some dependencies instead of
@Autowired)

[Fixes #49671463] User-hook for customizing embedded servlet container
2013-05-10 17:20:08 +01:00
Dave Syer
56865ab260 Fix integration sample (no web dependencies) 2013-05-10 16:21:30 +01:00
Dave Syer
eb2adc0b99 More fixes for @Configuration processing 2013-05-10 15:52:53 +01:00
Dave Syer
ad19edf03b Fix bug introduced by Spring @Configuration processing 2013-05-10 15:45:12 +01:00
Dave Syer
13cb224b0a [bs-113] Remove dependency on slf4j for core jars
Also added explicit version for starter dependencies.

[Fixes #49588267]
2013-05-09 15:32:31 +01:00
Dave Syer
5aeb3fe6ca Remove dependency on slf4j for core jars
[Fixes #49588267]
2013-05-09 14:11:01 +01:00
Dave Syer
21d55b231d [bs-108] Feature documentation: just a list and brief description
[Fixes #49502657]
2013-05-09 13:55:29 +01:00
Dave Syer
a0e51d06ea [bs-111] Extract TraceFilterConfiguration into separate file
We want the traces to be collected for the main app, but reported
in the management app, so the confi has to be separate.

[#49578819]
2013-05-09 12:37:23 +01:00
Dave Syer
ceab9b9b33 [bs-111] Extract trace logging from Security config
It's not really a security feature (just logging request headers),
so better to put it in the main actuator autoconfig.

[Fixes #49578819] [bs-111] Unresolvable cycle when separating management.port
2013-05-09 12:21:47 +01:00
Dave Syer
bff41d51ff [bs-108] Feature documentation: just a list and brief description
[#49502657]
2013-05-09 09:53:36 +01:00
Dave Syer
7800ebbdc7 Make management.port default to server.port 2013-05-09 09:41:24 +01:00
Dave Syer
e1c3dae8a1 Restore README for Actuator 2013-05-09 09:06:12 +01:00
Phillip Webb
88a1c1de41 Fix broken ServerPropertiesTests on OSX
Fixed ServerPropertiesTests to use InetAddress.getByName("127.0.0.1")
instead of InetAddress.getLocalHost().
2013-05-08 14:41:51 -07:00
Dave Syer
8bfe07c730 Use HttpStatus in ErrorPage 2013-05-08 15:33:25 +01:00
Dave Syer
4a292bd93f [bs-97] Support adding management endpoints to a different network
* ManagementProperties and ServerProperties now support an address property
* For example set management.port=9001,management.address=127.0.0.1 to listen
on port 9001 but only for connections from the localhost

[Fixes #49395783]
2013-05-08 12:08:02 +01:00
Dave Syer
8231377113 [bs-85] Move round and rename some actuator packages
[#49047535]
2013-05-08 11:04:24 +01:00
Dave Syer
694a1dd408 Bump version to 0.5.0.BUILD-SNAPSHOT 2013-05-08 10:07:22 +01:00
Dave Syer
b897f35cad [bs-85] New name for production-ready features = "actuator"
[#49047535]
2013-05-08 09:03:59 +01:00