Commit Graph

727 Commits

Author SHA1 Message Date
Phillip Webb dca637f51f Replace @ConditionalOnExpression with OnProperty
Replace where possible all @ConditionalOnExpression annotations with
@ConditionalOnProperty which is both faster to run and more descriptive.

Fixes gh-1685
2014-10-10 11:48:05 -07:00
Phillip Webb b87a591d27 Revert "Add ActiveMQ MQTT connection URL auto-detection"
This reverts commit 0d8bde58c9.

Fixes gh-1679
2014-10-09 19:24:47 -07:00
Phillip Webb 30f8954b4a Add @since tag 2014-10-09 13:04:44 -07:00
Phillip Webb 6281070d0a Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
2014-10-09 13:00:27 -07:00
Phillip Webb 6009f41782 Polish 2014-10-09 12:58:55 -07:00
Andy Wilkinson 4cf9e0457f Provide auto-configuration of persistence exception translation
Closes gh-1435
2014-10-09 16:19:33 +01:00
Dave Syer fa95a6f6bd Merge branch '1.1.x' 2014-10-09 16:11:52 +01:00
Dave Syer 3135c7f8ae Escape strings in whitelabel error page (HTML) 2014-10-09 16:10:57 +01:00
Andy Wilkinson 07cb8f2836 Ensure that spring.data.rest.* configuration takes effect
Previously, RepositoryRestMvcBootConfiguration was not annotated with
@Configuration. This meant that it was processed in lite mode.
Crucially, in lite mode, there’s no proxying so each call to the
config() @Bean method from within other @Bean methods resulted in the
creation of a new RepositoryRestConfiguration instance. Furthermore, as
each of these instances wasn’t a Spring bean the configuration
properties were not applied.

This commit updates RepositoryRestMvcBootConfiguration to annotate it
with @Configuration so that it’s no longer processed in lite mode. It
also updates the unit tests and the Spring Data REST sample to verify
that the baseUri can be configured using application.properties.

Fixes gh-1675
2014-10-09 14:29:38 +01:00
Henryk Konsek 0d8bde58c9 Add ActiveMQ MQTT connection URL auto-detection
Fixes gh-1638
2014-10-08 11:53:06 -07:00
Michael Stummvoll 5d32ec7463 Add VelocityProperties.preferFilesystemAccess
Update VelocityProperties to include a preferFilesystemAccess attribute.

Fixes gh-1652
2014-10-07 09:47:29 -07:00
Phillip Webb 62eb01f0b8 Polish 2014-10-06 12:03:51 -07:00
Sebastien Deleuze 315213ea4e Support Jackson based XML serialization and Jackson2ObjectMapperBuilder
This commit introduces support for Jackson based XML serialization, using the
new MappingJackson2XmlHttpMessageConverter provided by Spring Framework
4.1. It is automatically activated when Jackson XML extension is detected on the
classpath.

Jackson2ObjectMapperBuilder is now used to create ObjectMapper and XmlMapper
instances with the following customized properties:
 - MapperFeature.DEFAULT_VIEW_INCLUSION is disabled
 - DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES is disabled

JodaModuleAutoConfiguration and Jsr310ModuleAutoConfiguration have been removed
since their behaviors are now handled directly by the ObjectMapper builder.

In addition to the existing @Bean of type ObjectMapper support, it is now
possible to customize Jackson based serialization properties by declaring
a @Bean of type Jackson2ObjectMapperBuilder.

Fixes gh-1237
Fixes gh-1580
Fixes gh-1644
2014-10-06 10:54:38 +01:00
Stephane Nicoll 30351c6277 Provide native JtaTransactionManager when applicable
This commit updates JndiJtaConfiguration to provide the same detection
algorithm as <tx:jta-transaction-manager>. If a native JTA transaction
manager exists for the current platform, it is used instead of the regular
JtaTransactionManager implementation.

Fixes gh-1576
2014-10-02 16:33:31 +02:00
Dave Syer 339f3b7bf0 Add autoconfig support for Jersey (2)
Jersey 2 has some Spring support built in but it's a bit awkward to
use in a Boot app, so autoconfiguration seems appropriate. The tests
and sample show how to use it, but the short story is that any
@Component can define JAX-RS endpoints via @GET etc.

There's a sample for Jersey 1 as well (pay careful attention to
the plugin configuration if you want to build an executable jar)

Fixes gh-1651
2014-10-02 11:22:00 +01:00
Andy Wilkinson de8a2a71d0 Turn (Jackson|Gson)AutoConfiguration into true auto-configuration
Previously JacksonAutoConfiguration and GsonAutoConfiguration were
not actually auto-configuration classes. They were only processed
due to being imported by HttpMessageConvertersAutoConfiguration.
In addition to being misleadingly named, this meant that they could
not be included or excluded individually and were also tightly coupled
to HTTP message conversion.

This commit updates spring.factories to make both
JacksonAutoConfiguration and GsonAutoConfiguration actual
auto-configuration classes. As a result, they can now be enabled or
disabled individually and are no longer coupled to HTTP message
conversion.

Closes gh-1562
2014-10-02 10:33:02 +01:00
Manuel Doninger 02e33c125c Use reflection to load Hibernate version specific classes
This adds support for Hibernate 4.2 again by loading the specific
classes with reflection.

Fixes gh-1460, fixes gh-1557
2014-10-02 09:49:11 +01:00
Andy Wilkinson c601c09ecc Upgrade to Hibernate Validator 5.1.2.Final
Closes gh-1595
2014-10-01 17:28:29 +01:00
Dave Syer 8d5f26f6bd Fix missing resource exception if spring-cloud not on classpath 2014-09-30 15:08:58 +01:00
Marcel Overdijk e070d55491 Make Jackson date format and property naming strategy configurable
Allow the environment to be used to configure Jackson's date format
and property naming strategy

Closes gh-1628
2014-09-30 11:07:29 +01:00
Phillip Webb a7a337a14f Merge branch '1.1.x' 2014-09-25 22:04:23 -07:00
Phillip Webb d0990c06a6 Fix typo in HttpMessageConverters auto-conf Tests 2014-09-25 22:03:30 -07:00
Spring Buildmaster edb4b7ed7d Next development version 2014-09-25 21:02:37 -07:00
Phillip Webb 08f2522eba Add missing @since tag 2014-09-25 20:09:49 -07:00
Phillip Webb 1ed90df630 Merge branch '1.1.x' 2014-09-25 13:06:54 -07:00
Phillip Webb bff39e954e Add `server.tomcat.port-header` support
Update Tomcat ServerProperties to support the RemoteIpValve portHeader
property.

Fixes gh-1616
2014-09-25 13:04:12 -07:00
Phillip Webb 0dc46a2fe7 Drop protocolHeader and remoteIpHeader defaults
The `protocolHeader` and `remoteIpHeader` no longer have default values
and must be opt-in.

Fixes gh-1624
2014-09-25 12:58:23 -07:00
Phillip Webb abed1f4d4c Restore ThymeleafAutoConfiguration test
Restore the test removed during the merge.
2014-09-25 10:41:32 -07:00
Phillip Webb 38585ec4eb Merge branch '1.1.x' 2014-09-25 10:40:49 -07:00
Phillip Webb 258059ea08 Fix failing ThymeleafAutoConfigurationTests
Remove accidental addition of a 1.2 test.
2014-09-25 10:27:05 -07:00
Phillip Webb 0d0e5eb590 Merge branch '1.1.x' 2014-09-25 10:05:35 -07:00
Dave Syer 304920df07 Make Thymeleaf @ConditionalOnWebApplication
If user creates a Thymeleaf app with a parent-child context then the
child should contain all the web-specific pieces (and they are likely
to fail fast if they need to be ServletContextAware, or slower if they
try to locate a WebApplicationContext at runtime). This can't happen
if the view resolver is being added to the parent.

Freemarker and Velocity already have similar tests because it is assumed
that they should be usable outside a web app, so this change just does the
same for Thymeleaf.

Fixes gh-1611
2014-09-25 09:54:50 -07:00
Phillip Webb 0b50fe4eff Support String to char[] bindings
Update RelaxedConversionService to also support String to char[]
conversion. Primarily to support the `password` field in
MongoProperties.

Fixes gh-1572
2014-09-24 16:03:51 -07:00
Andy Wilkinson 5d1a114aa6 Merge branch '1.1.x'
Redundant @ConditionalOnMissingBean annotation has been removed.
ActiveMQConnectionFactoryConfiguration is not auto-configuration and
is imported by ActiveMQAutoConfiguration which is protected by
@ConditionalOnMissingBean(ConnectionFactory.class)
2014-09-23 10:14:03 +01:00
Andy Wilkinson cf22e28ddc Add tests to verify that ActiveMQAutoConfiguration backs off
See gh-1599
2014-09-23 10:11:26 +01:00
Andy Wilkinson 42821990f4 Merge branch '1.1.x' 2014-09-23 09:42:29 +01:00
Tomas Lin 38d8a5cda0 Fix typo in comment
Closes gh-1596
2014-09-23 09:42:03 +01:00
Phillip Webb 0468cf5a8f Merge branch '1.1.x' 2014-09-19 22:42:53 -07:00
Phillip Webb 468db03aef Formatting 2014-09-19 22:41:10 -07:00
Dave Syer b06d10ddb0 Merge branch '1.1.x' 2014-09-19 16:12:38 +01:00
Dave Syer d6165d97dd A few tweaks that might improve performance on startup
... or couldn't hurt anyway.

1. Extends the definition of a web application for @ConditionalOnWebapp
so that a StandardEnvironment can be used (cutting out JNDI failures
for Environment properties)

2. Doesn't bother using StandardServletEnvironment in integration tests

3. Make the NON_ENUMERABLE_ENUMERABLES in PropertySourcesPropertyValues
static so they only get initialized once (not a huge issue at all)
2014-09-19 16:11:10 +01:00
Phillip Webb 3c5b007ff9 Add @Order annotations to conditions
Fixes gh-1574
2014-09-17 21:55:43 -07:00
Andy Wilkinson 3c93d9a803 Merge branch '1.1.x' 2014-09-17 19:41:14 +01:00
Andy Wilkinson 6dcaec2fef Make all @Bean methods public
This is a continuation of the changes made in 611f978. It makes some
more @Bean methods public and adds tests to spring-boot-actuator and
spring-boot-autoconfigure to prevent against non-public methods being
introduced in the future

Closes gh-1571
2014-09-17 19:39:39 +01:00
Phillip Webb 88f8eb7fa4 Merge branch '1.1.x' 2014-09-17 10:46:30 -07:00
Phillip Webb 611f978181 Make all @Bean methods public
Fixes gh-1571
2014-09-17 10:45:23 -07:00
Phillip Webb 4f610fa5a1 Merge branch '1.1.x'
Conflicts:
	spring-boot-samples/spring-boot-sample-tomcat-ssl/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-ssl/src/test/java/sample/tomcat/SampleTomcatSslApplicationTests.java
	spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java
	spring-boot/src/main/java/org/springframework/boot/context/embedded/Ssl.java
2014-09-17 10:11:30 -07:00
Phillip Webb 62a5ce52d0 Backport Jetty/Tomcat SSL support
Fixes gh-1570
Cherry-picked from 0960908 and 258c6f1
2014-09-17 10:08:05 -07:00
Phillip Webb c0f69d28d3 Remove inadvertently committed debug System.out 2014-09-17 10:08:05 -07:00
Dave Syer 5946ade199 Merge branch '1.1.x' 2014-09-17 10:20:03 +01:00