Commit Graph

58 Commits

Author SHA1 Message Date
Dave Syer
7e579d3652 Revert strange looking DataSource chamge 2013-07-05 12:03:58 +01:00
Dave Syer
d9cc7575c3 Fixes for Security snapshot changes 2013-07-01 15:25:53 +01:00
Phillip Webb
56bfa30b2c Add setup profile
Add a setup profile allowing the maven plugin to be build alone.
Required to prevent 'unresolveable build extension' errors on a
fresh checkout.

Issue: #52091115
2013-06-20 17:24:47 -07:00
Phillip Webb
665d07ad74 Migrate to bootstrap maven plugin
Migrate certain samples to make use of the new bootstrap maven plugin

Issue: #52091115
2013-06-20 14:46:50 -07:00
Dave Syer
1f17ac3e34 Add some security managed dependencies 2013-06-14 15:32:47 +01:00
Gonçalo Silva and Scott Andrews
ed513ee846 Fix compile dependency on commons-logging 2013-06-14 15:20:42 +01: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
b761fa8ede Add tomcat starter and tweak spring CLI 2013-06-12 04:37:14 +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
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
e98368e3e6 [bs-52] Add configuration for trad sample running as war
The launcher project is used to run a war file.  Not working yet for
me anyway.

[#48386505] [bs-52] Support for running "traditional" webapps in place
2013-06-02 07:49:23 +01: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
990627b328 [bs-144] Make EmbedddedContainerConfiguration an import selector
Previously EmbedddedContainerConfiguration cannot be imported directly.
This change ensures that the nested classes are not loaded automatically
so there can be no issues with the annotation parameters.

There might be a case for a change in Spring here since the framework
itself could just be more cautious when processing nested classes.

[Fixes #50880927]
2013-05-31 13:24:04 +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
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
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
29a81b8795 [bs-130] Prevent double registration
* A simple check to see if it is already registered
fixed the original problem
* Also removed the need to have @ConfigurationProperties
on a bean class (unless you want to specify the target name
etc.)

[Fixes #50256421] [bs-130] When actuator app starts the
@ConfigurationProperties are registered with the bean
factory several times
2013-05-22 15:21:07 +01:00
Dave Syer
ab121dc91b [bs-127] Add DataSourceTransactionManager if no others are in use
* If the auto config class has a high Order it can check for
an existing transaction manager
* Unit tests added, and checked also witrh petclinic

[Fixes #50064347]
2013-05-18 16:20:22 +01:00
Dave Syer
00c227ac01 Add favicon.ico 2013-05-17 16:12:06 +01:00
Dave Syer
10573d2c74 Remove dependency-reduced-pom.xml 2013-05-17 16:10:59 +01:00
Dave Syer
6d844eb978 Allow mvn launch and shade plugin of UI sample 2013-05-17 16:08:55 +01:00
Dave Syer
a1dd6e3293 Fix data sample (needed an enum for spring.jpa.ddl_auto) 2013-05-17 16:07:40 +01:00
Dave Syer
430ec347fd Tweak dependency versions 2013-05-16 16:38:59 +01:00
Dave Syer
6d21ff71ba Add some dependencies to starters 2013-05-16 12:13:53 +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
e24ffa7e64 Fix samples to include integration as a submodule 2013-05-09 17:37:06 +01:00
Dave Syer
202dae3213 Fix missing version for spring-core 2013-05-09 16:14:16 +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
c0148b4536 Skip deployment for samples 2013-05-09 12:49:59 +01:00
Phillip Webb
cafded9e7e Polish JavaDoc 2013-05-08 13:20:25 -07: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
a5810af882 Add mvn deployment gumf 2013-05-08 10:53:37 +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
Dave Syer
bd35fd9306 [bs-98] Add MySQL data source to service sample
[#49393511] [bs-98] Add support for Tomcat database pool
2013-05-07 17:01:15 +01:00
Dave Syer
81d0f14080 [bs-52] ensure "mvn exec:java" works in trad web sample
[#48386505] [bs-52] Support for running "traditional" webapps in place
2013-05-07 09:51:03 +01:00
Dave Syer
b462bc6e6c [bs-96] Switch off m2e errors about /eclipse path
* Uploaded m2e eclipse baggage to http://static.springsource.org
* Changed location in parent pom
* Removed all main.basedir properties from poms

[Fixes #49285987]
2013-05-07 07:37:47 +01:00
Dave Syer
bd79ec2362 [bs-22] Move @ConfigurationProperties processing to main jar
Also add unit tests.  Note also the start.groovy for the service
sample now works.

[#48127729]
2013-05-01 14:01:13 +01:00
Dave Syer
30087cf6b9 [bs-55] Add strategy for setting system exit code
* Added ExitCodeGenerator and SpringApplication.exit
convenience method
* User can add bean of type ExitCodeGenerator or supply
one in the call to exit()

[Fixes #48475971]
2013-05-01 11:17:27 +01:00
Dave Syer
5501adc862 [bs-35] Add @ConfigurationProperties EndpointsProperties and bind to application.yml
[Fixes #48245695]
2013-05-01 09:14:01 +01:00
Dave Syer
ce2a2beab4 [bs-83] Rename "container" -> "server"
* Also extracted ManagementServerProperties into a separate
bean
* TraceRepository was still causing problems during startup,
fixed that
* Allow management endpoints to be switched off with port=0

[Fixes #49046013]
2013-05-01 08:41:05 +01:00
Dave Syer
ec0e9b17ad More ordering issues in service apps
* The TraceAutoConfiguration in the service project
was loading too early because it contains a BPP
* It also had a Spring Security dependency without any
@Conditional* configuration
* Fixed by nesting the BPP in a class with @Conditional*
2013-04-30 17:37:08 +01:00
Dave Syer
833b13bbbc [bs-80] Add configurable / switchable web request trace logging (headers etc)
* Added a bean post processor for the Spring Security filter chain
(so you only get traces by default if security is on)
* Every request is logged at trace level if the dump requests flag is
on
* Requests are also dumped to a TraceRepository for later analysis (very
useful for tracing problems in real time when a support call comes in)

[Fixes #48976001]
2013-04-30 15:24:27 +01:00