Commit Graph

252 Commits

Author SHA1 Message Date
Christian Dupuis
cf2b2df2c8 Correctly decode URL coming into the Jolokia endpoint
fixes #869
2014-05-15 17:36:27 +02:00
Phillip Webb
fa7da5925b Remove checked exceptions from @PostConstructs
Update all @PostConstruct methods to ensure that they don't throw
checked exceptions. Required to allow deployment of Spring Boot
applications on Glassfish.

Fixes gh-868
2014-05-15 15:47:44 +01:00
Andy Wilkinson
f761daf253 Upgrade to CRaSH 1.3.0-beta18
Closes #841
2014-05-12 10:35:20 +01:00
Spring Buildmaster
d3954a1703 Next development version 2014-04-24 02:24:28 -07:00
Phillip Webb
4119ef5cf4 Use random ports for tests
Update remaining tests to use random ports.

Fixes gh-337
2014-04-23 19:11:54 +01:00
Phillip Webb
f847ed2b1f Remove getEmbeddedServletContainers()
Remove the mutable getEmbeddedServletContainers() Map from
EmbeddedWebApplicationContext and instead use the `namespace` to
distinguish the management container.

The ServerPortInfoApplicationContextInitializer class replaces the
previous TestExecutionListener to exposes port properties (by
listening for EmbeddedServletContainerInitializedEvents).
2014-04-23 15:41:56 +01:00
Phillip Webb
fad5ce45db Polish 2014-04-23 12:35:33 +01:00
Phillip Webb
316cb87583 Create ApplicationPid and remove SystemUtils
Create a new ApplicationPid class to remove the need for SystemUtils
and refactor existing calls.
2014-04-23 12:00:36 +01:00
Dave Syer
b291332cd4 Use CountDownLatch instead of Thread.sleep()
... to wait for ApplicationContext to close in the 3 tests
that we needed to do so.

Fixes gh-664
2014-04-23 10:14:38 +01:00
Dave Syer
00b85e8c42 Ensure path starts with "/" in ErrorController
When mapping the ErrorController path to Spring Security it's
important that it starts with "/". This change ensures that is
the case even if the user has omitted the leading "/".

Fixes gh-694
2014-04-19 19:21:45 -07:00
Dave Syer
7b07fe8ce0 Convert remaining samples to use random port
Partial fix for gh-337. See also gh-607 which complements this, but might
conflict on a merge.
2014-04-17 20:29:04 -07:00
Dave Syer
f134e96053 Convert Actuator sample to dynamic ports 2014-04-17 17:36:09 -07:00
Dave Syer
41cdb7b48d Add parent directory creation
Also tidied a few other things up (like not needing
SmartApplicationListener).

Fixes gh-550
2014-04-11 06:33:03 +01:00
Jakub Kubrynski
f6488c7f66 Now after starting application PID file will be created
Fixes gh-550
2014-04-10 16:30:36 +01:00
Dave Syer
708d5ade9f Fix path stripper in JolokiaEndpoint to account for management.contextPath
When the user sets management.contextPath=/admin the Jolokia
endpoint gets mapped to /admin/jolokia, but that the path stripper it uses
internally makes a false assumption about the form of the request path.
The fix is simple (just use a smarter search for the endpoint path in the
request path).

Fixes gh-642
2014-04-08 09:58:17 +01:00
Spring Buildmaster
a5864ebcd0 Next development version 2014-04-06 22:43:18 -07:00
Dave Syer
72d7c286c0 Add Spring MVC-generated path suffixes to endpoint paths
Spring Security doesn't know that Spring MVC maps /foo, /foo.json
and /foo/ all to the same handler. This change explicitly adds
suffixes to the actuator endpoint matchers so they are properly
protected.
2014-04-03 14:03:09 +01:00
Spring Buildmaster
15e9dbe98b Next development version 2014-04-01 03:05:51 -07:00
Phillip Webb
1e68b7e0a9 Remove superfluous <packaging> tags from POMs 2014-04-01 02:07:43 -07:00
Phillip Webb
0af7f7e347 Add missing POM info 2014-04-01 02:07:42 -07:00
Phillip Webb
488b03387f Polish POM formatting 2014-04-01 02:07:36 -07:00
Phillip Webb
6f9bb233ad Revert "Next development version"
This reverts commit b67bb70ee3.
2014-04-01 00:38:48 -07:00
Spring Buildmaster
b67bb70ee3 Next development version 2014-03-31 22:38:42 -07:00
Dave Syer
499f54893b Add @Conditionals to switch off non-generic endpoints
Fixes gh-601
2014-03-31 17:33:39 -07:00
Phillip Webb
ac4cdd33c3 Revert "Next development version"
This reverts commit 1d0eea12eb.
Returning to 1.0.0.BUILD-SNAPSHOT for an updated release.
2014-03-31 17:14:30 -07:00
Spring Buildmaster
1d0eea12eb Next development version 2014-03-28 11:47:09 -07:00
Phillip Webb
d117a6b22b Polish 2014-03-27 11:21:51 -07:00
Dave Syer
71c2c69c92 Return actual status code not 200 to machine client
Machine clients are much more fussy than browsers and we
should take care to preserve the HTTP status for them.

Fixes gh-596
2014-03-27 17:23:47 +00:00
Dave Syer
d13827c45c Switch default query to 'select 1'
Fixes gh-555
2014-03-27 17:23:37 +00:00
Phillip Webb
beaddb2362 Polish 2014-03-26 13:29:26 -07:00
Dave Syer
e059d0cd5f Re-order security auto configuration so the fallback can be applied
The management security autoconfiguration wanted to come last in the chain
but that won't suit the fallback that was already in place for gh-568. This
change re-orders the autoconfig so that @EnableWebSecurity is still added
if the user sets security.basic.enabled=false and includes the actuator
endpoints.

Fixes gh-568
2014-03-25 17:03:10 +00:00
Phillip Webb
d42bedf295 Rename @ConfigurationProperties attributes
Rename `name` to `prefix` and `path` to `locations`.
2014-03-24 11:44:52 -07:00
Dave Syer
45315a97ff Prevent accidental failure of deployed war when management.port is set
We can't support (yet) embedded containers inside a deployed war (class
loader conflicts are inevitable, really). Until we figure out a way to
do it, we should just log a warning and advise the user to switch to
JMX for the actuator endpoints.

See gh-552
2014-03-24 08:07:39 +00:00
Dave Syer
b824a6ea05 Tweak to support finer grained locking
Fixes gh-543
2014-03-22 14:58:18 +00:00
Nicholas Hagen
8d442b1fbc Fix issue with paralellism and CodaHale metrics
Since there is no atomic remove/register operation for
Gauges, we need to synchronize.
2014-03-22 14:57:38 +00:00
Christian Dupuis
d08d98492d Add Environment to shell context; disable shell banner if spring.main.show_banner is set to false 2014-03-20 15:23:24 +01:00
Christian Dupuis
b760722234 Add endpoint command to shell
fixex #461
2014-03-20 11:05:27 +01:00
Phillip Webb
c5ee3c7eba Remove duplicate documentation
Remove README files that have been since been migrated to the reference
documentation. Also updated remaining markdown files to asciidoctor to
save having a mix of different formats.

Fixed gh-503
2014-03-16 23:00:12 -07:00
Phillip Webb
80ac1fb0cd Polish 2014-03-15 13:02:01 -07:00
Phillip Webb
22e397cda2 Polish 2014-03-13 13:11:54 -07:00
Dave Syer
6657e3ef84 More care taken with management.contextPath
The management.contextPath property should now be respected in a
secure application, whether or not the management.port is different.

Added some test cases in the sample to verify.

Fixes gh-469
2014-03-10 16:28:13 +00:00
Dave Syer
c9efa5ac13 Allow non-string return from health query 2014-03-08 16:04:30 +00:00
Spring Buildmaster
b0d4e8ae69 Next development version 2014-03-03 22:46:12 -08:00
Spring Buildmaster
cb8668a151 Release version 1.0.0.RC4 2014-03-03 22:46:05 -08:00
Phillip Webb
99350a2216 Tidy ConfigurableEmbeddedServletContainerFactory
Rename ConfigurableEmbeddedServletContainerFactory to
ConfigurableEmbeddedServletContainer and extract
AbstractConfigurableEmbeddedServletContainer from
AbstractEmbeddedServletContainerFactory.
2014-03-03 21:10:56 -08:00
Phillip Webb
468728a2c0 Polish 2014-03-03 17:50:19 -08:00
Dave Syer
07b88630f4 Be defensive with auto-config of Servlet 3.0 features
There's no explicit support for older Servlet specs in Spring Boot,
but we can at least make it easy for others to provide such
support by not adding stuff to the context when in an older container.
2014-03-03 18:08:38 +00:00
Dave Syer
b0b7bc0e7f Fix tests
Some assumptions were being made in tests, e.g. about
there being an AuthenticationManager @Bean, which were
false with the new Security 3.2.1 updates from Rob.

Also parent-child contexts with the actuator were
problematic because they didn't exclude the web configuration
for the management security in the parent context.

Fixes gh-244
2014-03-03 12:22:36 +00:00
Rob Winch
6b0eba3759 Update to Spring Security 3.2.1
Also change strategy for defaulting of Authentication. Spring
Boot authentication defaults are now encapsulated and can easily
be overridden by a user defined AuthenticationManager.
2014-03-03 12:21:37 +00:00
Dave Syer
13e040c06e Add ErrorWrapperEmbeddedServletContainerFactory for error pages in WARs
Error pages are a feature of the servlet spec but there is no Java API for
registering them in the spec. This filter works around that by accepting error page
registrations from Spring Boot's EmbeddedServletContainerCustomizer (any beans
of that type in the context will be applied to this container).

In addition the ErrorController interface was enhanced to provide callers
the option to suppress logging.

Fixes gh-410
2014-03-03 09:52:40 +00:00