Commit Graph

562 Commits

Author SHA1 Message Date
Stephane Nicoll
8f886e22ce Use @ConfigurationProperties for Thymeleaf
Add missing properties to complement 6568495

Fixes gh-1250
2014-07-14 11:18:36 +02:00
Stephane Nicoll
65684957ea Use @ConfigurationProperties for Thymeleaf
Fixes gh-1250
2014-07-14 11:08:16 +02:00
Stephane Nicoll
90cf722365 Use @ConfigurationProperties for Spring Batch
Fixes gh-1249
2014-07-14 11:04:21 +02:00
Stephane Nicoll
20e08494ae Fix typo 2014-07-11 16:02:08 +02:00
Stephane Nicoll
d01154c212 Move Spring Social and Spring Mobile configuration
This commit uses dedicated Properties classes instead of accessing
the raw environment for Spring Social and Spring Mobile. This
improves the readability and the discovery of such properties.

Fixes gh-1238
2014-07-11 11:02:00 +02:00
Stephane Nicoll
249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 2014-07-11 10:44:05 +02:00
Dave Syer
ede385d1b6 Modify @Condition for detecting existing message bundle resource
The problem with the old code is that it worces a ResourceBundle to
initialize with the default encoding (and that is then cached in the
JDK) during @Condition evaluation (so before the encoding is known).

Includes test for swedish messages

Fixes gh-1228
2014-07-10 12:42:02 +01:00
Spring Buildmaster
40327e1ae6 Next development version 2014-07-08 02:33:36 -07:00
Gary Russell
ce0cbe05bf Restore AMQP vHost leading / support
Update RabbitProperties since vHosts have no restrictions requiring a
leading slash and can have any number of leading slashes.

Fixes gh-1206
2014-07-08 01:33:47 -07:00
Phillip Webb
4ede9cd1be Support websockets with Tomcat 8.0.8
Fixes gh-1210
2014-07-08 00:59:34 -07:00
Andy Wilkinson
6a0eb90007 Upgrade to Spring Batch 3.0.1
Due to a mistake in Spring Batch 3.0.0 it has been necessary to
introduce a breaking API change (the addition of
BatchConfigurer.getJobExplorer()) in the 3.0.1 release. This commit
updates Boot to use 3.0.1 and modifies the Batch auto-configuration
and associated tests to implement the new method.
2014-07-08 00:03:30 -07:00
Dave Syer
aa38d33404 Support for setting credentials and vhost in rabbit addresses
User can now add credentials, vhost and protocol prefix (amqp://)
to any or all of the addresses, extending the format beyond that accepted
bu the rabbitmq client, but making it cloud friendly. Only one of
the addresses needs those properties and all are optional. Port
also defaults to 5672 in an address.
2014-07-07 19:56:50 +01:00
Phillip Webb
fa88c481a5 Remote trailing whitespace 2014-07-02 15:17:14 -07:00
Toshiaki Maki
e306cff4ff Fix typo in FlywayAutoConfiguration's javadoc
Closes #1183
2014-07-01 09:44:22 +01:00
Toshiaki Maki
9febd4a4cb Support sqlScriptEncoding in schema.sql
Fixes gh-1165, fixes gh-1164
2014-06-27 12:55:12 +01:00
Spring Buildmaster
981669b7c0 Next development version 2014-06-26 14:09:54 -07:00
Phillip Webb
200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
2014-06-26 11:03:09 -07:00
Spring Buildmaster
67189477fe Next development version 2014-06-26 10:51:35 -07:00
Phillip Webb
9632abf825 Formatting and cleanup 2014-06-26 09:41:15 -07:00
Dave Syer
c0305ecbbb Take care registering DataSourceInitializer
The DataSourceInitializer is instantiated early by the
DataSourceInitializerPostProcessor, so it has to live in
isolation (in its own @Configuration) to prevent early
instantiation of the DataSourceAutoConfiguration.

Fixes gh-1166
2014-06-26 09:49:44 +01:00
Spring Buildmaster
542f3cbda8 Next development version 2014-06-24 13:53:56 -07:00
Dave Syer
b2db3790de Improve test for JobLauncherCommandLineRunner (see gh-1125) 2014-06-24 10:39:28 +01:00
Phillip Webb
c713c8091d Polish 2014-06-23 19:41:22 -07:00
Jonas Bergvall
078db8cb74 Separate the configuration/creation of the default ObjectMapper
bean from the registration of Jackson modules to avoid circular creation
of the default ObjectMapper bean (and thus failing to obtain the ObjectMapper
and registering the module(s)).

Fixes gh-1132
2014-06-22 09:57:53 +01:00
Phillip Webb
bfe4240ed2 Polish 2014-06-20 10:29:04 -07:00
Phillip Webb
445589a5d2 Polish RabbitMQ Changes
Fix the formatting which was messed up in commit ad1636fd. Also
simplify the RabbitProperties.setVirtualHost logic a little

See gh-1128
2014-06-20 10:29:04 -07:00
Phillip Wirth
ad1636fd34 RabbitMQ virtual hosts can how start with a slash
The autoconfig strips out slashes where necessary to make a valid
hostname

Fixes gh-1128
2014-06-20 17:46:54 +01:00
Dave Syer
1e5882b19c Make copy of job parameters before weeding out non-identifying ones
Fixes gh-1125
2014-06-19 18:15:44 +01:00
Dave Syer
c6175073ae Be slightly more defensive in DataSource initialization
Adding an Order to the BeanPostProcessor and catching an exception
are enough to get a simple web app with @EnableGlobalMethodSecurity
and JDBC user details running. It actually doesn't solve an underlying
problem in Spring Security, but I'll deal with that separately.

See gh-1115
2014-06-19 14:26:22 +01:00
Phillip Webb
34a32991fa Be defensive about solr classes required
Update SolrAutoConfiguration to specifically require HttpSolrServer
and CloudSolrServer classes rather than the generic SolrServer.

This prevents the rather cryptic "@ConditionalOnMissingBean annotations
must specify at least one bean" error that can occur if an earlier
version of solr happens to be on the classpath (as is the case when
hibernate-search is used).

Fixes gh-1098
2014-06-18 16:30:39 -07:00
Phillip Webb
46c46dbd0c Refine Spring Social auto-configuration
Refine auto-configuration for Spring Social to:

- Only auto-configure FB/Twitter/LinkedIn if the `app-id` property is
  set.
- Only configure ConnectController and ProviderSignInController if
  there is a ConnectionFactoryLocator.
- Auto-configure Spring Social's SpringSocialDialect for Thymeleaf if
  Thymeleaf is present.
- Added several tests around Spring Social auto-configuration.

Fixes gh-1118
2014-06-18 13:46:19 -07:00
Phillip Webb
179e1558f6 Polish 2014-06-18 12:48:42 -07:00
Dave Syer
f8e847a6fc Change ordering of DataSourceInitializer a bit
It needs to run as soon as the DataSource is available really otherwise
anything else that depends on the DataSource (like Security JDBC
initializers) might fail when it tries to use it.

One change from 1.1.1 is that if you have a schema.sql you had better
make sure your data.sql talks to the same tables. In 1.1.1 you could
sometimes get away with letting Hibernate initialize the tables for
your data.sql and *also* have a schema.sql. This was fragile and doomed
to fail eventually if the DataSourceInitializer somehow got
initialized earlier (e.g. through a @DependsOn), so in the spririt
of honesty being the best policy we explicitly disallow it now.

Fixes gh-1115
2014-06-18 15:19:53 +01:00
Phillip Webb
25eb6fb81a Polish 2014-06-17 12:14:24 -07:00
Stephane Nicoll
2bff12a7b5 Better support for HornetQ embedded broker
Prior to this commit it was not safe to start several contexts
using the HornetQAutoConfiguration in the same VM. Each context
was trying to start their own HornetQ embedded broker by default but
only the first was really starting. Worse, the various InVM connection
factories were all silently connecting to the first broker.

This commit introduces a new "serverId" property that is an auto-
incremented integer by default. This identifies the server to connect
to and allows each context to start its own embedded broker in total
isolation of other contexts.

This commits makes it possible for a context to disable its own
embedded broker and connect to an existing one, potentially started
by another context.

Fixes gh-1063
2014-06-17 15:02:46 +02:00
Dave Syer
13076b8792 Order logger output by short classname
Fixes gh-1067
2014-06-17 12:28:28 +01:00
Stephane Nicoll
b646231327 Properly close context hierarchy in tests
Prior to this commit, some tests were creating a parent/child
relationship but were only closing the child context. This could
be an issue with the autoconfig module as a lot of auto-config
kicks in by default.

This commit adds a new test utility designed to properly handle
those situations. Updated tests that were creating a context
hierarchy to benefit from that.

Fixes gh-1034
2014-06-17 10:58:33 +01:00
Dave Syer
571a82fe90 Add @EnableEntityLinks to hypermedia support 2014-06-16 18:19:51 +01:00
Dave Syer
2ddf322a65 Add @Conditional to prevent HATEOAS blowing up
Spring Plugin is required when using @EnableHypermediaSupport
2014-06-16 17:29:03 +01:00
Phillip Webb
eddc6b31f1 Improve error message on condition exceptions
Catch exceptions thrown from SpringBootCondition and re-throw with
more context.

See gh-1098
2014-06-15 09:24:14 -07:00
Phillip Webb
a374929c90 Polish 2014-06-15 09:09:06 -07:00
Dave Syer
1bf256dd58 Ensure Weblogic and Websphere JMX are covered
To ensure an MBeanServer is available when needed you have to
look in JNDI before resorting to the JDK platform factory.

I had to copy some private code from Spring, but it seems
worth it.

Fixes gh-1092
2014-06-13 11:27:41 +01:00
Spring Buildmaster
4ca26a21dc Next development version 2014-06-11 10:46:27 -07:00
Dave Syer
d36f9ce8e0 Add tests for switching message sources in tests
See gh-1075
2014-06-11 17:21:05 +01:00
Dave Syer
8d6f003e9a Defensive null check in case Hibernate autoconfig is off
If the Hibernate autoconfig is not used to create an EntityManager
then I suppose it's possible that the JpaProperties might be null
when everything else is ready for the event to be published.

There's no test case because I think it's a corner case.

Fxies gh-1075
2014-06-11 16:54:11 +01:00
Dave Syer
32a220da8f Test for message properties 2014-06-11 16:39:56 +01:00
Spring Buildmaster
05ed7b3bcd Next development version 2014-06-10 12:40:35 -07:00
Phillip Webb
3341a5db2b Deprecate @ConditionalOnMissingClass.value
Fixes gh-1069
2014-06-10 10:20:50 -07:00
Dave Syer
e8fcb0c875 Use classname instead of value in @ConditionalOnMissingClass
See gh-1065
2014-06-10 17:38:15 +01:00
Phillip Webb
3007a777d0 Roll back to 1.1.0.BUILD-SNAPSHOT 2014-06-10 09:00:08 -07:00