Commit Graph

227 Commits

Author SHA1 Message Date
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
Dave Syer
82f49abeba Expose setter for Map store in InMemoryMetricRepository
User can then use a weak reference map (for instance), if worried
about memory usage.
2014-02-26 17:07:31 +00:00
Phillip Webb
083cb388c0 Upgrade to Spring Security 3.2.1
Fixes gh-392
2014-02-24 21:54:33 -08:00
Phillip Webb
cf23b519d2 Polish 2014-02-24 13:43:54 -08:00
Dave Syer
08d8cb8efd Add /mappings endpoint
Lists AbstractUrlMappings and AbstractHandlerMethodMappings
in a loose Map structure. E.g.

{
  "/**/favicon.ico": {
    "bean": "faviconHandlerMapping"
  },
  "/**": {
    "bean": "resourceHandlerMapping"
  },
  "/webjars/**": {
    "bean": "resourceHandlerMapping"
  },
  "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}":
     {
       "bean": "requestMappingHandlerMapping",
       "method": "public java.util.Map<java.lang.String, java.lang.Object> org.springframework.boot.actuate.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)"
...
}

Fixes gh-378
2014-02-24 13:34:07 +00:00
Dave Syer
d98bfdea37 Make sure metricsExecutor is shutdown cleanly
The default executor for publishing metrics was a single
thread (native JDK) ExecutorService with a non-daemon thread.
Changed it to a Spring-managed thread pool of size 1, which
is then shutdown with e ApplicationContext automatically.

Fixes gh-388
2014-02-24 11:32:27 +00:00
Dave Syer
b2b487ee5f Add ServletRegistrationBean for DispatcherServlet
Mapping is exposed via server.servletPath.

Fixes gh-379
2014-02-20 09:49:24 +00:00
Dave Syer
0aa3b00fdf Ensure shutdown endpoint is disabled by default
Fixes gh-377
2014-02-20 08:36:18 +00:00
Phillip Webb
b69c659d8f Polish 2014-02-18 21:58:09 -08:00
Dave Syer
f888567c1d Be defensive about Spring Security dependencies
In particular don't assume that Spring Security Web is on the
classpath, just because Spring Security Core is.

Fixes gh-363
2014-02-17 18:08:23 +00:00
Spring Buildmaster
1367d57e8c Next development version 2014-02-13 13:19:12 -08:00
Spring Buildmaster
eaff1677a7 Release version 1.0.0.RC3 2014-02-13 13:18:56 -08:00
Dave Syer
8de9890757 Add scope=test to hsqldb (fixes #330) 2014-02-11 13:36:50 +00:00
Christian Dupuis
af75dd0e40 Move remaining properties for consistency 2014-02-06 14:50:35 +01:00
Phillip Webb
ed9735361e Apply source cleanup and formatting 2014-02-05 22:53:28 -08:00
Phillip Webb
80f2336f17 Polish 2014-02-05 22:31:56 -08:00
Ben
c251e33bf8 Document that applicaiton.yml requires snakeyaml
Update documentation to reference the need for a yaml library to be on
the classpath.

Fixes gh-313
2014-02-05 21:14:51 -08:00
Phillip Webb
8763fab0e7 Extract inner configuration property classes
Extract all inner @ConfigurationProperties classes from @Configuration
classes for consistency.
2014-02-05 18:12:41 -08:00
Phillip Webb
37c2c89bcb Restructure packages
Improve package structure and attempt to co-locate related classes.
2014-02-05 14:39:01 -08:00
Phillip Webb
31c385470e Update ErrorMvcAutoConfiguration for Spring 4
Update ErrorMvcAutoConfiguration thymeleaf condition to use the
`spring4` package.

Fixes gh-310
2014-02-04 12:29:40 -08:00
Phillip Webb
676cacd308 Use '-1' to disable management port
Update `EndpointWebMvcAutoConfiguration` to use '-1' to indicate that
the management context should be disabled. This brings consistency
between the server settings and the management settings and allows '0'
to be used to pick a random port.

Fixed gh-311
2014-02-04 12:03:29 -08:00
Phillip Webb
f7d4490b2d Fix package tangle with AutoConfigurationReport
Rename AutoConfigurationReport to ConditionEvaluationReport and
co-locate with conditions.
2014-02-03 17:25:50 -08:00
Christian Dupuis
5e2cfe1cfe Add some javadoc. Fix typos. 2014-02-03 09:55:46 +01:00
Phillip Webb
6431fef91e Polish 2014-01-31 22:51:41 -08:00
Christian Dupuis
3911ce3e29 Filter out CGLIB generated bean properties from configuration properties report 2014-01-31 12:16:17 +01:00
Christian Dupuis
6519ee0171 Change order of properties in endpoint mbean objectNames to make display in jconsole nicer 2014-01-31 12:16:17 +01:00