Commit Graph

819 Commits (3a4f1f6f39380a0624e50a7d64b034dd2ef4b363)

Author SHA1 Message Date
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
10 years ago
Henryk Konsek 0d8bde58c9 Add ActiveMQ MQTT connection URL auto-detection
Fixes gh-1638
10 years ago
Michael Stummvoll 5d32ec7463 Add VelocityProperties.preferFilesystemAccess
Update VelocityProperties to include a preferFilesystemAccess attribute.

Fixes gh-1652
10 years ago
Phillip Webb 62eb01f0b8 Polish 10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
Andy Wilkinson c601c09ecc Upgrade to Hibernate Validator 5.1.2.Final
Closes gh-1595
10 years ago
Dave Syer 8d5f26f6bd Fix missing resource exception if spring-cloud not on classpath 10 years ago
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
10 years ago
Phillip Webb a7a337a14f Merge branch '1.1.x' 10 years ago
Phillip Webb d0990c06a6 Fix typo in HttpMessageConverters auto-conf Tests 10 years ago
Spring Buildmaster edb4b7ed7d Next development version 10 years ago
Phillip Webb 08f2522eba Add missing @since tag 10 years ago
Phillip Webb 1ed90df630 Merge branch '1.1.x' 10 years ago
Phillip Webb bff39e954e Add `server.tomcat.port-header` support
Update Tomcat ServerProperties to support the RemoteIpValve portHeader
property.

Fixes gh-1616
10 years ago
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
10 years ago
Phillip Webb abed1f4d4c Restore ThymeleafAutoConfiguration test
Restore the test removed during the merge.
10 years ago
Phillip Webb 38585ec4eb Merge branch '1.1.x' 10 years ago
Phillip Webb 258059ea08 Fix failing ThymeleafAutoConfigurationTests
Remove accidental addition of a 1.2 test.
10 years ago
Phillip Webb 0d0e5eb590 Merge branch '1.1.x' 10 years ago
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
10 years ago
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
10 years ago
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)
10 years ago
Andy Wilkinson cf22e28ddc Add tests to verify that ActiveMQAutoConfiguration backs off
See gh-1599
10 years ago
Andy Wilkinson 42821990f4 Merge branch '1.1.x' 10 years ago
Tomas Lin 38d8a5cda0 Fix typo in comment
Closes gh-1596
10 years ago
Phillip Webb 0468cf5a8f Merge branch '1.1.x' 10 years ago
Phillip Webb 468db03aef Formatting 10 years ago
Dave Syer b06d10ddb0 Merge branch '1.1.x' 10 years ago
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)
10 years ago
Phillip Webb 3c5b007ff9 Add @Order annotations to conditions
Fixes gh-1574
10 years ago
Andy Wilkinson 3c93d9a803 Merge branch '1.1.x' 10 years ago
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
10 years ago
Phillip Webb 88f8eb7fa4 Merge branch '1.1.x' 10 years ago
Phillip Webb 611f978181 Make all @Bean methods public
Fixes gh-1571
10 years ago
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
10 years ago
Phillip Webb 62a5ce52d0 Backport Jetty/Tomcat SSL support
Fixes gh-1570
Cherry-picked from 0960908 and 258c6f1
10 years ago
Phillip Webb c0f69d28d3 Remove inadvertently committed debug System.out 10 years ago
Dave Syer 5946ade199 Merge branch '1.1.x' 10 years ago
Dave Syer 95c15733bc Use ErrorController.getErrorPath() to ignore the error path for security
Fixes gh-1548 again
10 years ago
Andy Wilkinson e8ce93715a Merge branch '1.1.x' 10 years ago
Andy Wilkinson eed58eecb4 Improve error handling in EnableAutoConfigurationImportSelector
Previously, EnableAutoConfigurationImportSelector assumed that it
would always find auto-configuration attributes from an
@EnableAutoConfiguration annotation. This assumption does not hold
true in certain circumstances, although exactly what those
circumstances are is unclear. It could occur if the import selector
were used directly, but it's package-private making that unlikey. In
such circumstances a NullPointerException was being thrown.

This commit asserts that the attributes are non-null and, should the
assertion fail, produces an error that is more helpful than an NPE.

Closes gh-1512
10 years ago
Andy Wilkinson 284e7b2091 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 468b6cb1f7 Add support for configuring RemoteIpValve’s internalProxies
Closes gh-1522
10 years ago
Andy Wilkinson 4b25b0e7a2 Allow Jackson features to be configured via the environment
Enhance JacksonAutoConfiguration to configure features on the
ObjectMapper it creates based on the following configuration
properties:

spring.jackson.deserialization.* = true|false
spring.jackson.generator.* = true|false
spring.jackson.mapper.* = true|false
spring.jackson.parser.* = true|false
spring.jackson.serialization.* = true|false

The final part of each property name maps onto an enum. The enums are:

deserialization: com.fasterxml.jackson.databind.DeserializationFeature
generator: com.fasterxml.jackson.core.JsonGenerator.Feature
mapper: com.fasterxml.jackson.databind.MapperFeature
parser: com.fasterxml.jackson.core.JsonParser.Feature
serialization: com.fasterxml.jackson.databind.SerializationFeature

Closes gh-1227
10 years ago
Phillip Webb 26ac68df05 Polish Redis sentinel support 10 years ago
Phillip Webb b129bc261a Polish 10 years ago
Phillip Webb 565e449d89 Merge branch '1.1.x'
Conflicts:
	spring-boot-docs/src/main/asciidoc/howto.adoc
10 years ago
Phillip Webb 5ba86a103d Polish 10 years ago
Andy Wilkinson c02804931f Merge branch '1.1.x' 10 years ago
Andy Wilkinson 6f9f335ea1 Add additional class conditions for JTA auto-configuration
Previously, JTA auto-configuration would fail with a variety of
ClassNotFoundExceptions and NoClassDefFoundErrors if it was used with
an “incomplete” classpath. This commit adds a number of classes to
@ConditionalOnClass annotations so that the auto-configuration backs
off gracefully in the absence of certain classes.

Specifically, the following now work as expected:

 - Deploying an app to a server with JTA available via JNDI when the
   app does not use transactions
 - Auto-configuration of Atomikos without JMS
 - Auto-configuration of Bitronix without JMS

Both XADataSourceAutoConfiguration and JndiDataSourceAutoConfiguration
have been updated to back off in the absence of spring-jdbc; a
dependency of DataSourceProperties which is used by both classes.

Error handling in AtomikosDependsOnBeanFactoryPostProcessor and
BitronixDependentBeanFactoryPostProcessor has been enhanced so that the
correct dependencies are established, even in the absence of JMS.

Fixes gh-1538
10 years ago
Dave Syer 6456f2a542 Add url,user,password to LiquibaseProperties
User can set those properties (optionally) to use a different
DataSource than the default.

Fixes gh-1558
10 years ago
Dave Syer 59ce634437 Use class name not value to support non-Hibernate JPA vendors
With this change I got a simple Eclipselink version of the data-jpa
sample working. I'll push that when I get time to research it a bit more
(I needed to set up a Java agent so either that might be a problem
for our integration tests if we can't work around it).

Fixes gh-1268. Cherry picked onto master after (apparently) a failed
merge of commit ac2ab39.
10 years ago
Dave Syer 049cd4b85b Merge branch '1.1.x' 10 years ago
Dave Syer 437fb75424 Add /error to ignored paths for security autoconfig
Protecting /error doesn't make a great deal of sense and if it is
protected you don't get the ErrorPageFilter for the attempt at loading
it, so Tomcat renders its own HTML error page (when deployed as WAR).

Fixes gh-1548
10 years ago
Dave Syer 389c4f3e0b Merge branch '1.1.x' 10 years ago
Dave Syer 9902f98a3d Ensure the AuthenticationManager is created when needed
There was too much state really in the old implementation of
AuthenticationManagerConfiguration, and it was leading occasionally
to null pointers when method A assumed that method B had already
been called and it hadn't. This change manages to concentrate all the
references to an AuthenticationManagerBuilder into a single method
call, removoing the need for storing it at all.

Fixes gh-1556
10 years ago
Dave Syer 0950072b5e Fix integration test (shared context by accident) 10 years ago
Christoph Strobl c8a4891441 Add support for Redis Sentinel configuration
Spring Data Redis 1.4.0 introduced Redis Sentinel support. When
specified, RedisConnectionFactory uses the Sentinel configuration to
determine the current master.

Sentinel configuration can be specified using two new properties:
spring.redis.sentinel.master and spring.redis.sentinel.nodes.

For example:

spring.redis.sentinel.master=mymaster # name of redis server
spring.redis.sentinel.nodes=127.0.0.1:26379,127.0.0.1:26380

Alternatively, a bean of type RedisSentinelConfiguration can be declared
and it will be used to configure the connection factory.

Note: At this time, Sentinel support is only available for Jedis

Closes gh-1337
10 years ago
Andy Wilkinson fbeb8c966c Upgrade to Spring Data Evans
The missing bean condition on the auto-configuration classes for
Elasticsearch, Jpa, Mongo and Solr repositories have been tightened to
look for ElasticsearchRepositoryFactoryBean, JapRepositoryFactoryBean,
MonoRepositoryFactoryBean, and SolrRepositoryFactoryBean respectively.

In Spring Data Evans, when there are multiple repository types on the
classpath, a strict mode is entered to prevent the different
repositories from trampling over each other. A side-effect of this is
that for the Mongo domain types in the tests to be discovered they
must be explicitly annotated with @Document.

Closes gh-1338
10 years ago
David Liu 8e9e502b6a Add support for auto-configuration of Commons DBCP2
Closes gh-1292
Closes gh-1477
10 years ago
Stephane Nicoll 02a8a9c07b Add auto configuration for Spring AMQP 1.4 features
This commit adds two additional auto-configuration items that are new
in Spring AMQP 1.4:

* A RabbitMessagingTemplate is automatically created if none is present
* A default RabbitListenerContainerFactory is automatically created if
none is present.

Besides @EnableRabbit is enabled automatically if the necessary classes
are present and a ConnectionFactory is available.

Fixes gh-1495
10 years ago
Phillip Webb 84249da941 Add @ConditionalOnBean to Thymeleaf dialect beans
Fixes gh-1507
10 years ago
Spring Buildmaster d63e4b4329 Next development version 10 years ago
Phillip Webb 4d27458fee Replace MongoProperties condition for spring-cloud
Replace @ConditionalOnBean(MongoProperties.class) on
MongoDataAutoConfiguration with @EnableConfigurationProperties since
MongoAutoConfiguration will not be applied in a cloud environment.

Fixes gh-1502
10 years ago
Phillip Webb 8bf1f9567a Apply eclipse formatting and cleanup rules 10 years ago
Andy Wilkinson 8399fc990c Verify that @EnableIntegrationMBeanExport can set custom JMX domain
Add a test to JmxAutoConfigurationTests which verifies that
@EnableIntegrationMBeanExport can be used on a @Configuration class
to customize the default domain used for MBeans created by Spring
Integration. See https://jira.spring.io/browse/SPR-12128.

Closes gh-1451
10 years ago
Phillip Webb 1697174cd8 Remove ExtendedPathMatchingResourcePatternResolver
Remove ExtendedPathMatchingResourcePatternResolver which is not required
with Spring 4.1

Fixes gh-1420
10 years ago
Phillip Webb f7cffce695 Allow custom JNDI ConnectionFactory lookup
Add a `spring.jms.jndi-name` property to allow a JMS ConnectionFactory
to be obtained from a custom JNDI location.

Fixes gh-1471
10 years ago
Phillip Webb 0326abfe01 Support for composed "any" condition
Add `AnyNestedCondition` which can be used to create a logical 'or' of
other conditions contained on nested classes. For example:

	static class OnJndiOrProperty extends AnyNestedCondition {

		@ConditionalOnJndi()
		static class OnJndi {
		}

		@ConditionalOnProperty("something")
		static class OnProperty {
		}

	}

Fixes gh-1490
10 years ago
Phillip Webb 236026a43a Support mixed XA/non-XA ConnectionFactory beans
Update ActiveMQ and HornetQ XA configurations to also expose non-xa
ConnectionFactory variants.

Fixes gh-1461
10 years ago
Phillip Webb ba5c3526da Merge branch '1.1.x' 10 years ago
Phillip Webb 34cbcf5e50 Support better HttpMessageConverters manipulation
Add additional constructor and a protected postProcessConverters method
to make it easier to manipulate the final converter list that will
be used.

Fixes gh-1482
10 years ago
Phillip Webb 5774e808c7 Fix HornetQ ClassNotFound issues when not embedded
Update HornetQConnectionFactoryConfiguration and
HornetQXAConnectionFactoryConfiguration so that they no longer depend
on the HornetQ EmbeddedJMS class. EmbeddedJMS beans are started
(when possible) from the HornetQConnectionFactoryFactory.

Fixes gh-1480
10 years ago
Phillip Webb 4c8d35db43 Rename CompositeDataSourcePoolMetadataProvider
Rename CompositeDataSourcePoolMetadataProvider to
DataSourcePoolMetadataProviders.
10 years ago
Phillip Webb a512bcf766 Always auto-configure pool metadata providers
Import DataSourcePoolMetadataProvidersConfiguration from
DataSourceAutoConfiguration so that PoolMetadataProviders are configured
even if actuator is not used.
10 years ago
Phillip Webb 69107cb1df Create metadata sub-package
Create `org.springframework.boot.autoconfigure.jdbc.metadata` package
and move DataSourcePoolMetadata classes.
10 years ago
Phillip Webb e56be6cf3d DataSourceMetadata -> DataSourcePoolMetadata
Rename DataSourceMetadata to DataSourcePoolMetadata
10 years ago
Phillip Webb e17769fc2f Polish DataSourceMetrics code 10 years ago
Phillip Webb adbded33ff Apply eclipse formatting rules to 3dc932db 10 years ago
Stephane Nicoll 53c4859a6a Reuse data source validation query in health endpoint
This commit improves DataSourceMetadata to expose the validation
query. This can be used by DataSourceHealthIndicator as the query
to use instead of "guessing" which query could be applied according
to the database type.

Fixes gh-1282
10 years ago
Stephane Nicoll 2694941b93 Fix DataSourceMetadata location
This commit complements 3dc932db8 and fix the package location of
DataSourceMetadata.

Fixes gh-1013
10 years ago
Phillip Webb 0143bec831 Polish 10 years ago
David Liu b1ceb8a43b Add database property to RedisProperties
Add database property to RedisProperties and use it in
RedisAutoConfiguration.

Fixes gh-1379
10 years ago
Phillip Webb f8a4df0838 Polish 10 years ago
Stephane Nicoll a0c316d392 Improve RepositoryRestConfiguration customization
This commit binds RepositoryRestConfiguration to the spring.data.rest
prefix so that any of its property can be customized through the
environment.

If a RepositoryRestMvcConfiguration is defined in the context, those
customization do not apply, as it was the case before.

Fixes gh-1171
10 years ago
Phillip Webb ff870de0f0 Fix a few JTA issues
- Search for ConnectionFactories in java:/JmsXA and
  java:/XAConnectionFactory
- Remove javax.transaction:jta managed dependency
- Removed unused JtaProperties argument

Fixes gh-947
10 years ago
Phillip Webb 1024d5d42a Polish 10 years ago
David Liu f4ccaa874a Provide auto-configuration for Gson
Closes #1339
10 years ago
Phillip Webb 239d19d38c Support JNDI for JTA and JMS.
Update auto-configuration for JMS and JTA to support a ConnectionFactory
and TransactionManager exposed via JNDI.

JTA configuration now attempts a simple JtaTransactionManager before
attempting Bitronix or Atomikos configuration.

The JMS auto-configuration also now attempts to find a ConnectionFactory
from JNDI before falling back to the previous strategies. If JNDI is
present a JndiDestinationResolver is also configured instead of the
default DestinationResolver.

See gh-947
10 years ago
Phillip Webb da88bb4791 Update JMS auto-configuration to support XA
Update JMS auto-configuration for ActiveMQ and HornetQ to support XA
transactions.

See gh-947
10 years ago
Phillip Webb 8219f2be4c Update DataSource auto-configuration to support XA
Update DataSource and JPA auto-configuration to consider XA datasources.

See gh-947
10 years ago
Josh Long 5ef136511f Add Atomikos and Bitronix JTA auto-configuration
Add auto-configuration for the Atomikos and Bitronix JTA libraries.

See gh-947
10 years ago
Josh Long 508bd14ad9 Add SpringJtaPlatform for Hibernate
Add SpringJtaPlatform Hibernate AbstractJtaPlatform implementation. Also
relocated SpringNamingStrategy to the `hibernate` sub-package.

See gh-947
10 years ago
Phillip Webb b3ce079ea1 Automatically apply @EnableJMS
Automatically apply @EnableJMS when spring-jms is on the classpath
and the annotation hasn't already been applied. This allow for Spring's
new @JmsListener annotation to just work.

Fixes gh-1425
10 years ago
Phillip Webb a4925dabf7 Add property for JNDI DataSource lookup
Add `spring.datasource.jndi-name` property to allow a DataSource to be
looked up from JNDI as an alternative to defining a URL connection.

Fixes gh-989
10 years ago
Phillip Webb c98713ba95 Inject PlatformTransactionManager bean for JMS
Update JmsAutoConfiguration to inject any PlatformTransactionManager
bean into the DefaultJmsListenerContainerFactory.

Fixes gh-1444
10 years ago
Phillip Webb 5b9d45b231 Inject any existing JMS DestinationResolver bean
Update JmsAutoConfiguration to inject any existing DestinationResolver
bean into JmsTemplate and DefaultJmsListenerContainerFactory.

Fixes gh-1443
10 years ago
Phillip Webb 7a5248e38c Polish 10 years ago
Dave Syer 3404850b2e Merge branch '1.1.x' 10 years ago
Dave Syer 95d65c2ff5 Add indirection to avoid runtime dependency on MVC in templates
Velocity and Freemarker share some common properties so the base class for
configuring their properties makes some sense. Unfortunately the implementation
pulls in Spring MVC at runtime because of the signature of one method (that
would never be called). We can fix that in a number of ways, but the least
disruptive is probably to change the signature of that method and only refer
to the concrete template view resolver type if the method is called.

Fixes gh-1437
10 years ago
Dave Syer 5fd9af23d6 Merge branch '1.1.x' 10 years ago
Dave Syer 607f78a779 Add secure sample with JDBC and data.sql
We can't easily solve the problem by not allowing Spring Security to
eagerly instantiate everything, but we can be defensive about data.sql
and make sure it is executed even if the listener isn't yet registered.

Fixes gh-1386
10 years ago
Phillip Webb 658dc10722 Merge branch '1.1.x' 10 years ago
Phillip Webb d515595ca1 Detect embedded DBs when deducing driver class
Fix DataSourceProperties getUsername() and getPassword() methods to
call getDriverClassName() rather than using `this.driverClassName` to
ensure than deduced driver classes can be used.

Fixes gh-1421
10 years ago
Phillip Webb e6c18a00a1 Polish 10 years ago
Phillip Webb 77bf558307 Relocate configuration prefix constant
Relocate DataSourceAutoConfiguration.CONFIGURATION_PREFIX to
DataSourceProperties.PREFIX.
10 years ago
Phillip Webb 3512f56c0a Polish spaces->tabs 10 years ago
Phillip Webb 059bf3aae1 Use org.hsqldb.jdbc.JDBCDriver HSQLDB Driver
Switch driver class to the more conventionally named
`org.hsqldb.jdbc.JDBCDriver`.
10 years ago
Phillip Webb 49805661f0 Merge branch '1.1.x' 10 years ago
Phillip Webb 650e326ae7 Align MessageSource path search fix with SPR-12095
Update ExtendedPathMatchingResourcePatternResolver to use similar
code as the fix for SPR-12095.

Fixes gh-1378
10 years ago
Dave Syer 171b2e452b Make ServerProperties bean conditional on being a webapp 10 years ago
Phillip Webb 83bd36d8e0 Merge branch '1.1.x'
Conflicts:
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java
10 years ago
Phillip Webb eb721b1e9f Find 'messages*.properties' in all jar URLs
Update the the PathMatchingResourcePatternResolver used in the
MessageSourceAutoConfiguration condition to deal with the fact
that `classpath*:` patterns do not work with URLClassLoaders when
the pattern doesn't include a folder.

The ExtendedPathMatchingResourcePatternResolver works by searching
all classpath URLs when the `findAllClassPathResources` method is
called with an empty location.

Fixes gh-1378
10 years ago
Phillip Webb 6e6bc25c44 Polish 10 years ago
Dave Syer 91d3edc220 Tidy imports 10 years ago
Phillip Webb b3ba86390f Relax EntityManagerFactoryBuilder Map generic
Relax the generic signature on EntityManagerFactoryBuilder.properties
so that any object type can be added.

Fixed gh-1376
10 years ago
Phillip Webb ebd0d265f8 Polish 10 years ago
Phillip Webb 8476a79dd2 Add support for RelaxedDataBinder aliases
Update RelaxedDataBinder to support property aliases and change
DataSourceBuilder to use them.

Fixes gh-1384
10 years ago
Phillip Webb 45c8eca4f2 Add @ConditionalOnMissingBean(MongoDbFactory)
Update MongoAutoConfiguration to be conditional on a missing
MongoDbFactory bean. The assumption is that if the user has declared
a MongoDbFactory they will either use it directly, or they will also
register a Mongo bean.

If the MongoDbFactory class cannot be found the existing Mongo
auto-configuration still applies. This ensures that users that do
not have Spring Data can still access a Mongo bean.

Fixes gh-1341
10 years ago
Phillip Webb e0c3dd79f9 Add String type attribute to OnBean conditions
Fixes gh-1381
10 years ago
Ramnivas Laddad 912d5cf40b Add auto-configuration for Spring Cloud
Enable if all of the following are true:
- spring-cloud is on the classpath
- There is no Cloud bean present
  (usually done by extending AbstractCloudConfig)
- The "cloud" profile is active

Fixes gh-1302

Autoconfigure spring-cloud
10 years ago
Phillip Webb 21995cc85d Polish 10 years ago
Dave Syer 300910f7d5 Merge branch '1.1.x' 10 years ago
Dave Syer 0cf1c6f0e5 Refactor AuthenticationManagerConfiguration to make sure it works
if user also adds @EnableWebMvcSecurity. The problem is that the ordering
of the init() and configure() methods in the Spring Security configurers
can force things to happen too early unless we are careful. It's still a bit
twitchy I would say, but this relatively small change seems to fix the GS guide
and not break any existing tests.

I added a sample which mimic ths GS guide so we get an integration test that
executes the new code paths.

Fixes gh-1364
10 years ago
Phillip Webb acb621e84f Polish 10 years ago
Stephane Nicoll d089685935 Add auto configuration for Spring 4.1 JMS features
This commit adds two additional auto-configuration items that are new
in Spring 4.1

* A JmsMessagingTemplate is automatically created if none is present
* A default JmsListenerContainerFactory is automatically created if
  @EnableJms has been triggered and no default has been set manually

Fixes gh-1298
10 years ago
Stephane Nicoll 6217c1b095 polishing 10 years ago
Spring Buildmaster 74d0c5185a Next development version 10 years ago
Dave Syer 178386abc4 Merge branch '1.1.x' 10 years ago
Dave Syer 38f8d65756 Use ApplicationEvent to ensure that authentication event publisher is registered
There was a reference to an old (fixed) issue in Spring which led to some simplification
of the AuthenticationManager layering as well.

Fixes gh-1335
10 years ago
Phillip Webb 13bb23ac5a Merge branch '1.1.x' 10 years ago
Phillip Webb 88828f5097 Use MongoDbFactory to create GridFsTemplate
Update MongoDataAutoConfiguration to use the MongoDbFactory when
creating GridFsTemplate.

Fixes gh-1295
10 years ago
Andy Wilkinson ce02e86b89 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 7d213950ad Never run data.sql scripts if spring.datasource.initialize is false
Previously, the data scripts were always run in response to the
publication of a DataSourceInitializedEvent, irrespective of
spring.datasource.initialize. While the event won't be published by
DataSourceInitializer if spring.datasource.initialize is false, it
will be published if spring.jpa.hibernate.hbm2ddl.auto has been set.

This commit updates DataSourceInitializer's handling of
DataSourceInitializedEvent to only run the data scripts if
spring.datasource.initialize is true.

Fixes #1336
10 years ago
Dave Syer 68582bbac2 Merge branch '1.1.x' 10 years ago
Dave Syer 6c5f8f9581 Add @Inherited to @EnableAutoConfiguration
Fixes gh-1328
10 years ago
Phillip Webb 8e0b3dd00a Rename some ConditionalOnProperty attributes
Rename the newly introduced @ConditionalOnProperty `match` and
`defaultMatch` attributes to `havingValue` and `matchIfMissing`.

Also added a new `name` attribute as an alternative to `value` to
aid readability.

Closes gh-1000
10 years ago
Phillip Webb 6825a7b42e Polish 10 years ago
Oliver Gierke 81cd11b4ec Improved detection of manual Spring Data repository configuration
The presense of store-specific RepositoryConfigurationExtension beans
is used to disable auto-configuration for JPA, Mongo, and Solr

Closes #1267
10 years ago
Max Bruchmann ee40fb8cf1 Add auto-configuration for Thymeleaf data dialect
Closes #1120
10 years ago
Phillip Webb 53d24301d1 Merge branch '1.1.x' 10 years ago
Phillip Webb f8bf0e2031 Polish 10 years ago
Phillip Webb 5e1552b718 Retain default order in HttpMessageConverters
The original fix for gh-1293 (commit 05e6af23) caused test failures due
to the fact that Spring Boot's MappingJackson2HttpMessageConverter was
added before Spring's default StringHttpMessageConverter.

This commit changes the HttpMessageConverters logic so that additional
converts are added just before any default converter of the same type.
This allows additional converters to be added whilst still retaining
the sensible ordering of the default converters.

Fixes gh-1293
10 years ago
Dave Syer 5ce4669055 Merge branch '1.1.x' 10 years ago
Dave Syer 05e6af23cf Prepend without replacing in HttpMessageConverters
It was incorrect to simply replace existing instances because you can't
tell from the instance which media types and java types it supports. This
fix just prepends the custom converters so they get higher priority.

Fixes gh-1293
10 years ago
Andy Wilkinson 0960908bd7 Add support for configuring SSL declaratively
Both Tomcat and Jetty can now be configured to use SSL via the
environment (typically application.properties or application.yml)

Closes #1084
10 years ago