Commit Graph

542 Commits (542f3cbda887e4d0bc087bb63fbcb7186dd1f2f3)

Author SHA1 Message Date
Spring Buildmaster 542f3cbda8 Next development version 11 years ago
Dave Syer b2db3790de Improve test for JobLauncherCommandLineRunner (see gh-1125) 11 years ago
Phillip Webb c713c8091d Polish 11 years ago
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
11 years ago
Phillip Webb bfe4240ed2 Polish 11 years ago
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
11 years ago
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
11 years ago
Dave Syer 1e5882b19c Make copy of job parameters before weeding out non-identifying ones
Fixes gh-1125
11 years ago
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
11 years ago
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
11 years ago
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
11 years ago
Phillip Webb 179e1558f6 Polish 11 years ago
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
11 years ago
Phillip Webb 25eb6fb81a Polish 11 years ago
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
11 years ago
Dave Syer 13076b8792 Order logger output by short classname
Fixes gh-1067
11 years ago
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
11 years ago
Dave Syer 571a82fe90 Add @EnableEntityLinks to hypermedia support 11 years ago
Dave Syer 2ddf322a65 Add @Conditional to prevent HATEOAS blowing up
Spring Plugin is required when using @EnableHypermediaSupport
11 years ago
Phillip Webb eddc6b31f1 Improve error message on condition exceptions
Catch exceptions thrown from SpringBootCondition and re-throw with
more context.

See gh-1098
11 years ago
Phillip Webb a374929c90 Polish 11 years ago
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
11 years ago
Spring Buildmaster 4ca26a21dc Next development version 11 years ago
Dave Syer d36f9ce8e0 Add tests for switching message sources in tests
See gh-1075
11 years ago
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
11 years ago
Dave Syer 32a220da8f Test for message properties 11 years ago
Spring Buildmaster 05ed7b3bcd Next development version 11 years ago
Phillip Webb 3341a5db2b Deprecate @ConditionalOnMissingClass.value
Fixes gh-1069
11 years ago
Dave Syer e8fcb0c875 Use classname instead of value in @ConditionalOnMissingClass
See gh-1065
11 years ago
Phillip Webb 3007a777d0 Roll back to 1.1.0.BUILD-SNAPSHOT 11 years ago
Dave Syer 36130b27e1 Support for Jmx (and Integration) autoconfig in parent contexts
When there are parent contexts we already had a strategy for registering
the actuator endpoints, but not the regular JMX or Integration MBeans.
This chnage makes the autoconfigs for JMX aware of the parent context.

Also adds a sample with a parent context.

See gh-847
11 years ago
Spring Buildmaster c650f2391e Next development version 11 years ago
Phillip Webb b5d267ca89 Polish 11 years ago
Phillip Webb 2ad4c47d18 Polish 11 years ago
Dave Syer dcb17a7cb5 Enhance @Conditionals for JMX autconfig
Fixes gh-1059
11 years ago
Roy Clarkson 1a32a6a06b Fix issues with DeviceDelegatingViewResolverAutoConfiguration
- Log to the correct class
- Set Auto-configure after Thymeleaf hint on main class instead of
  internal static class
- Use 'thymeleafViewResolver' bean name instead of class for
  conditional bean checks
- Fix class name in properties documentation

Fixes gh-1052
11 years ago
Dave Syer aa30fdba18 Add MBeanServer @Bean in case it is needed
Anywhere that an MBeanServer is needed it should be
created @Conditionally, so that user can exclude the
JmxAutoConfiguration and still get the other JMX
behaviours automatically.
11 years ago
Dave Syer 1a5c4f88b4 Fix compilation error 11 years ago
Dave Syer 39a94428d3 Add @Conditionals to permit JPA/Mongo mixed usage
I decided to go with both approaches (make the autoconfig for
repositories @ConditionalOnMissingBean(RepositoryFactoryBeanSupport),
so the first one wins; and also make them conditional on
spring.data.*.repositories.enabled=true. The ordering problem
is still there really (it's not defined which repositories will
be created by the autoconfig), so if a user is going to have
2 repository implementations on the classpath, he is going to
have to either choose one to disable, or manualy @Enable* the
other one.

Fixes gh-1042
11 years ago
Phillip Webb 2852f7422e Polish Spring Mobile Auto-configuration
Update Spring Mobile support with the following changes:
- Apply source formatting
- User lowercase property prefixes
- Use dashed notation when accessing properties
- Inline some constants

See gh-1049
11 years ago
Dave Syer 6902f2ac97 Revert on bean condition for mongo repositories 11 years ago
Dave Syer dd176ccacf Fix broken test (ordering) 11 years ago
Dave Syer 376d6fb9bc Add test for mixed Mongo/Jpa repositories 11 years ago
Dave Syer e81e94924c Fix Devc->Devic
(Leaving the docs changes for later)

Fixes gh-1049
11 years ago
Craig Walls f2351f1ece Add ProviderSignInController for Spring Social
Update SocialWebAutoConfiguration to add a ProviderSignInController.
Also fix default UserIdSource.

Fixes gh-1050
11 years ago
Roy Clarkson 8f32b87c81 Improve Spring Mobile Auto-configuration
- Upgrade Spring Mobile dependency to 1.1.2
- Rename SitePreferenceAutoConfiguration "enabled" property
- Add Auto-configuration for LiteDeviceDelegatingViewResolver
- Update docs

Fixes gh-1049
11 years ago
Phillip Webb e891aa3525 Polish 11 years ago
Phillip Webb 93aefa8537 Polish Flyway and Liquibase
Extract common "depends on" functionality to a new
EntityManagerFactoryDependsOnPostProcessor class.

Apply consistent formatting.

Fix issue with Flyway location detection.
11 years ago
Phillip Webb 4a6e66fe8b Polish ConditionalOnJava
Apply formating and simplify the condition implementation. Delegate
to Spring's JdkVersion class to obtain the running version.
11 years ago
Phillip Webb e032b673a2 Polish DataSourceInitialization code
Rename a few classes and methods relating to DataSourceInitialization
and update the DataSourceInitializedPublisher to check for Hibernate
settings.
11 years ago