Commit Graph

47 Commits

Author SHA1 Message Date
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
Dave Syer
361f500ed5 [bs-28] Add /shutdown endpoint to service apps
Disabled by default use container.allow_shutdown=true to switch
it on.  Then POST to /shutdown to shut down the app.

[#48059059]
2013-04-30 10:17:39 +01:00
Dave Syer
628a8c79aa [bs-19] Medley of changes supporting integration apps
* Use file adapters in sample instead of internal flow
* Add Exception to signature of CommandLineRunner for
implementation convenience
* Updates for Security snapshots
2013-04-29 08:35:01 +01:00
Dave Syer
61fa55b524 [bs-62] Add assertions to CLI integration tests
[Fixes #48658503]
2013-04-26 08:22:30 +01:00
Dave Syer
bcf86b320e [bs-72], [bs-75] Add Batch plugin features
* Auto config in main bootstrap jar
* Compiler enhancements in groovy cli
* Sample script in cli samples

[Fixes #48716881], [Fixes #48788313]
2013-04-26 07:01:37 +01:00
Dave Syer
83e0ea22c1 [bs-19] Add samples and CLI support for Spring Integration
$ cd spring-bootstrap-cli
    $ export SPRING_HOME=target
    $ src/main/scripts/spring run samples/integration.groovy

The big disadvantage at the moment is that there is no goo way to
detect Spring Integration in the AST (at least not as good as @Enable*).
So for now we are looking for @MessageEndpoint or a class name with
SpringIntegration in it.

[#48151147]
2013-04-25 17:15:05 +01:00
Dave Syer
38f0cf1ed2 [bs-62] Add integration tests for CLI samples
[Fixes #48658503]
2013-04-24 16:09:17 +01:00
Dave Syer
c91e83c7d2 [bs-59] Add zip packaging for cli module
* Also added "spring" shell script (in zip), so you can
unzip it and run out of the box
* To run in developer mode use SPRING_HOME, e.g.

        $ cd spring-bootstrap-cli
        $ SPRING_HOME=target src/main/scripts/spring run samples/web.groovy
* Also added "clean" command to remove spring bootstrap grapes
(useful to force a refresh of snapshot jars)

[#48644271]
2013-04-24 11:38:57 +01:00
Dave Syer
fb6b224470 Fast forward existing prototype work 2013-04-24 10:02:07 +01:00