Commit Graph

3850 Commits

Author SHA1 Message Date
Phillip Webb ad69a1aec9 Merge pull request #2265 from metcox/master
* pull2265:
  Fix global `endpoints.enabled` property support
2014-12-31 19:09:01 -08:00
Mathieu Bernatet bf839e57a5 Fix global `endpoints.enabled` property support
Update AbstractEndpoint to correctly support the `endpoints.enabled`
property. Also fix EnvironmentEnpoint which would previously prevent
the Environment from being set.

Fixes gh-2264
Closes gh-2265
2014-12-31 19:05:25 -08:00
Phillip Webb 491a61d54a Merge pull request #2266 from mafr/master
* pull2266:
  Add application version info to JAR manifest
2014-12-31 19:01:00 -08:00
Matthias Friedrich 91587d63a2 Add application version info to JAR manifest
Update maven-jar-plugin configuration in spring-boot-starter-parent
with `addDefaultImplementationEntries` so that implementation versions
are included by default.

Fixes gh-2266
2014-12-31 19:00:27 -08:00
Phillip Webb 161cb7ab8a Merge pull request #2270 from ericdahl/docs-health-builder
* docs-health-builder:
  Update custom HealthIndicator documentation
2014-12-31 18:55:14 -08:00
Eric Dahl aa43f5e037 Update custom HealthIndicator documentation
Update the custom HealthIndicator documentation to use the build()
method rather than the old mechanism.

Fixes gh-2270
2014-12-31 18:53:58 -08:00
Phillip Webb 788b69d98d Merge branch '1.1.x' 2014-12-30 15:39:55 -08:00
Dave Syer f4e12e96c6 Additional condition to protect Reactor 2.0 users
(cherry picked from 80d55c47)
Closes gh-2255
2014-12-30 15:39:13 -08:00
Dave Syer bee6dd928e Reverse priority of property sources when extracting sub properties
(cherry picked from commit 300e570f)
Fixes gh-2261
See gh-1259

Conflicts:
	spring-boot/src/test/java/org/springframework/boot/bind/RelaxedPropertyResolverTests.java
2014-12-30 14:31:25 -08:00
Phillip Webb c08f912abd Merge branch '1.1.x' 2014-12-30 14:25:34 -08:00
Russell Allen fe83aed6b2 Grammar correction
Closes gh-2262
2014-12-30 14:24:13 -08:00
Stephane Nicoll 7d180ee8ed Merge branch '1.1.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2014-12-30 16:37:20 +01:00
Stephane Nicoll 1567c00ef0 Upgrade to Spring Framework 4.0.9
Closes gh-2259
2014-12-30 16:33:49 +01:00
Stephane Nicoll 2b3061b31f Upgrade to Spring 4.1.4
Closes gh-2249
2014-12-30 14:54:25 +01:00
Stephane Nicoll 95cf63f685 Switch to Spring snapshot
See gh-2249
2014-12-29 10:20:09 +01:00
Phillip Webb 0735d6e259 Fix TemplateLocation.anyExists logic
Fix broken logic in TemplateLocation.anyExists caused by not using the
local `searchPath` variable.

See gh-2184
Closes gh-2248
2014-12-28 13:22:41 -08:00
Phillip Webb c0d5ad0f0f Merge pull request #2250 from breun/master
* pull2250:
  Add docs for Spring Boot CLI via MacPorts
2014-12-28 12:27:20 -08:00
Nils Breunese 6248d8c86e Add docs for Spring Boot CLI via MacPorts
Add MacPorts section to reference docs since the Spring Boot CLI
is now also maintained in MacPorts.

Closes gh-2250
2014-12-28 12:26:06 -08:00
Phillip Webb c7cfdbe250 Polish appendix 2014-12-28 12:22:16 -08:00
Phillip Webb 6ece075aec Merge branch '1.1.x' 2014-12-28 12:19:30 -08:00
Phillip Webb a0667ba4bb Polish docs 2014-12-28 12:10:44 -08:00
Stephane Nicoll 0a19fd0af0 Merge branch '1.1.x' 2014-12-28 10:52:16 +01:00
Stephane Nicoll 38594cd820 Remove unused code
Closes gh-2244
2014-12-28 10:51:53 +01:00
Stephane Nicoll 2bf01ebeca Merge branch '1.1.x' 2014-12-27 18:28:50 +01:00
Stephane Nicoll 05e402295d Mention environment variables mapping in the guide
Closes gh-2234
2014-12-27 18:28:13 +01:00
Dave Syer 94b06be683 Change bean name metricReporitory -> actuatorMetricRepository
Fixes gh-2189
2014-12-27 07:44:17 +00:00
Phillip Webb d7a12a8791 Remove superfluous semi-colons 2014-12-26 20:48:53 -08:00
Phillip Webb fe20116b68 Propagate https scheme when using Jetty
Update Jetty 9 SSL support to register the SecureRequestCustomizer which
ensures that calling getScheme() on the HttpServletRequest returns
'https'.

Fixes gh-2232
2014-12-26 13:44:09 -08:00
Phillip Webb 0702b4e7e3 Merge branch '1.1.x'
Conflicts:
	spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfigurationTests.java
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
2014-12-26 11:48:13 -08:00
Phillip Webb 96d479c3d9 Make RequestMappingHandlerMapping @Primary
Update WebMvcAutoConfiguration so that the RequestMappingHandlerMapping
bean is @Primary. Prior to this commit a NoUniqueBeanDefinitionException
would be thrown then using the MvcUriComponentsBuilder.

Fixes gh-2237
2014-12-26 11:42:10 -08:00
Stephane Nicoll 79413bf9ef Merge pull request #2236 from izeye/master
* pull2236:
  Remove unecessary semicolon
2014-12-26 11:11:24 +01:00
izeye bff41358bf Remove unecessary semicolon 2014-12-26 11:11:01 +01:00
Phillip Webb 98135c964b Remove Principal handler logic from security
Update ManagementSecurityAutoConfiguration so that MVC Endpoints that
have Principal arguments are not treated in any special way. This
restores Spring Boot 1.1.x behavior where the 'sensitive' flag is used
to determine access rules.

The HealthMvcEndpoint still uses the Principal (when available) to
determine if full status information can be displayed. It now also
explicitly checks the environment for `endpoints.health.sensitive`
to determine if the user has opted-out and requires complete health
details.

The health MVC endpoint should now work as follows:

* Default configuration - No login is required, full information is only
  displayed if a Principal is available.
* endpoints.health.sensitive=true - Login is required, full information
  is displayed.
* endpoints.health.sensitive=false - Login is not required, full
  information is displayed.

Fixes gh-2211
2014-12-25 12:42:45 -08:00
Phillip Webb 22bb6f7598 Fix accidental fork logic change
Fix accidental change from commit b42c7fca.
2014-12-24 19:20:04 -08:00
Phillip Webb b42c7fca64 Polish 2014-12-24 11:33:11 -08:00
Phillip Webb 291a8d422b Fix incorrect BitronixJtaConfiguration bean name
Fixes gh-2231
2014-12-24 10:58:28 -08:00
Phillip Webb 45c5e25a05 Polish 2014-12-24 10:57:42 -08:00
Stephane Nicoll 05d47c65db Fix wrong link
Closes gh-2223
2014-12-23 17:38:55 +01:00
Stephane Nicoll 4a314321d7 Merge branch '1.1.x' 2014-12-23 11:54:54 +01:00
Stephane Nicoll ed1db855c0 Upgrade to Thymeleaf 2.1.4
Closes gh-2215
2014-12-23 11:51:26 +01:00
Domingo Suarez Torres dbb795298c Restore proper use of the fork parameter
Previously, disabling forking was not possible if JVM arguments or an
agent are specified, even if the fork attribute is explicitly set to
`false`.

The  fork attribute is now detected as it should and forking is disabled
when the fork attribute is set to false, even if JVM arguments or an
agent is either specified or discovered.

Fixes gh-2220
2014-12-23 11:15:12 +01:00
Phillip Webb 8628adcb74 Order EmbeddedServletContainerCustomizers
Add Ordered interface to all EmbeddedServletContainerCustomizers with
a value of 0. Prior to this commit it was difficult for a user to
define a customizer that would be applied before ours, even if they
implemented Ordered or added @Order annotations.

Fixes gh-2123
2014-12-22 22:04:08 -08:00
Phillip Webb ef621c9271 Protect against NoClassDefFoundError on WAS
Update HibernateJpaAutoConfiguration to catch NoClassDefFoundError when
setting the JTA_PLATFORM. The exception can occur when running on WAS
since it ships with Hibernate 4.2 and SpringJtaPlatform extends from
AbstractJtaPlatform which is not present.

The exception is now ignored if a JDNI environment is available,
otherwise it is re-thrown.

Fixes gh-2218
2014-12-22 21:32:54 -08:00
Phillip Webb fd97c7553c Apply HATEOAS module to primary ObjectMapper
Update HypermediaAutoConfiguration to apply the Jackson2HalModule to
the primary ObjectMapper. This restores the behavior of Spring Boot
1.1 where HATEOAS types could be serialized for both `application/json`
and `application/json+hal` content types.

A `spring.hateoas.apply-to-primary-object-mapper` property has also been
provided to opt-out if necessary.

Fixes gh-2147
2014-12-22 20:35:50 -08:00
Phillip Webb ea84479e9a Fix HATEOAS sample application version number 2014-12-22 20:29:18 -08:00
Phillip Webb 4ed42aac37 Merge branch '1.1.x' 2014-12-22 20:29:11 -08:00
Phillip Webb 7d017a2a6b Add HATEOAS sample application 2014-12-22 20:28:15 -08:00
Andy Wilkinson e57b0e00f2 Use ServletContainerInitializers to start servers
The Servlet spec prohibits ServletContextListeners from being registered
programatically other than from with a call to
`ServletContainerInitializer.onStartup`. This restriction is not
consistently enforced by the various embedded servlet containers that
Boot supports:

- Jetty 8 does not enforce the restriction.
- Jetty 9 enforces the restriction. We were working around it be calling
  setExendedListenerTypes(true) on the context.
- Tomcat somewhat enforces the restriction: it doesn't allow a
  ServletContextListener to be added once the first
  ServletContextListener has been called. We were using a
  LifecycleListener to drive the ServletContextListeners.
- Undertow enforces the restriction and we were not working around it.
  This resulted in gh-2192 being raised.

ServletListenerRegistrationBean is a ServletContextListener and is used
to register listeners, including ServletContextListeners, with the
servlet context. To adhere to the letter of the servlet spec this means
that ServletListenerRegistrationBeans need to be called from with
ServletContainerInitializer.onStartup. This commit updates all of the
embedded servlet container implementations to use a
ServletContainerInitializer to drive any ServletContextInitializers.

This makes the lifecycle more consistent across the supported containers
and allows ServletListenerRegistrationBeans to be able to register
ServletContextListeners on all supported embedded containers.

Fixes gh-2192
2014-12-22 11:26:43 -08:00
Phillip Webb d4fb8ad6a8 Polish POM artifact order 2014-12-22 11:23:18 -08:00
Stephane Nicoll 20c8e54c5f Revert dea1ca9855
Actually collection types are not harmonized to their interface
counterpart; this was implemented in the first proposal but wasn't
applied in the final review.

See gh-2206
2014-12-20 10:31:11 +01:00