Commit Graph

210 Commits

Author SHA1 Message Date
Phillip Webb
ac54d7fe3c Final polish before 1.0.0.RC1 2014-01-21 16:28:17 -08:00
Phillip Webb
cdda330acd Update copyright header for files changed in 2014 2014-01-21 10:27:10 -08:00
Dave Syer
ea3b82091b Tweak javadocs in SprinApplicationBuilder 2014-01-21 14:29:19 +00:00
Dave Syer
8f4059147c Revert "Upgrade to Tomcat 7.0.50"
This reverts commit 3d60696b9b.
2014-01-21 12:18:12 +00:00
Phillip Webb
68293f34af Upgrade version to 1.0.0.BUILD-SNAPSHOT
Fixes fg-243
2014-01-21 00:43:54 -08:00
Phillip Webb
3d60696b9b Upgrade to Tomcat 7.0.50
Upgrade to Tomcat 7.0.50, working around the potential
NullPointerException by also adding dependencies to
tomcat-embedded-jasper (which is now also required for Hibernate
Validator 5.0, see commit 377953babd)

Fixes gh-245
2014-01-20 23:45:27 -08:00
Phillip Webb
56364ecd46 Allow custom PersistenceUnitManager with JPA
Allow JPA auto-configuration to use an optional custom
PersistenceUnitManager defined as a bean.

Fixed gh-238
2014-01-19 21:59:06 -08:00
Dave Syer
8db1d0e044 Fix some TODOs 2014-01-19 16:00:10 +00:00
Dave Syer
07da034571 Allow @EnableTransactionManagement to be supplied by user 2014-01-19 14:11:04 +00:00
Christopher Smith
25cc68cafe Add spring.resources.cachePeriod to MvcAutoConfiguration
Fixes gh-232
2014-01-17 18:48:32 +00:00
Phillip Webb
f103a976f8 Don't use @ComponentScan for default packages
Update the 'default' package used for @Entity and Repository scanning
to be the package of the class annotated with @EnableAutoConfiguration
rather than using @ComponentScan.

This allows JPA and Spring Data to be used without requiring component
scanning and also removes the confusion that could arise from reusing
the @ComponentScan annotation, which already has well defined semantics.

Fixes gh-200
2014-01-16 22:57:07 -08:00
Phillip Webb
b85f984349 Refine auto-configuration report log levels
Refine the `AutoConfigurationReportLoggingInitializer` log level to
only display the information about enabling debug if the debug level
if not on.

Fixes gh-199
2014-01-16 13:07:48 -08:00
Phillip Webb
53f1488f70 Don't automatically log auto-configuration report
Update the `AutoConfigurationReportLoggingInitializer` to only output
the report at debug level. A crash report now triggers an info output
suggesting the user runs again with '--debug' to display the report.

Fixes gh-199
2014-01-16 12:57:13 -08:00
Phillip Webb
312535bcd5 Add SpringNamingStrategy to improve FK names
Add a new `SpringNamingStrategy` hibernate `NamingStrategy` that
extends `ImprovedNamingStrategy` to improve the name of foreign
key columns.

Fixes gh-213
2014-01-16 10:38:56 -08:00
Andy Wilkinson
b45683f103 Only auto-configure Reduce if Lettuce is on the classpath
Fixes #226
2014-01-15 10:48:26 +00:00
Phillip Webb
ffe8bf5419 Remove unused .gitignore files 2014-01-13 21:53:24 -08:00
Phillip Webb
47da8a817a Polish 2014-01-10 13:06:54 -08:00
Christian Dupuis
62e02d3d81 Add initialSize configuration property to datasource auto configuration
fixes #206
2014-01-10 11:32:18 +01:00
Christian Dupuis
1a44b3e676 Fix sorting of auto configuration classes on JDK 8 2014-01-09 20:56:06 +01:00
Dave Syer
2377bd9ec9 Don't load BatchAutoConfiguration at all if there is no JobLauncher
Fixes gh-204
2014-01-09 17:50:03 +00:00
Dave Syer
b1db714c23 Allow @EnableGlobalMethodSecurity in a non webapp
Fixes gh-202
2014-01-09 17:13:59 +00:00
Dave Syer
aebaa580db Add test for user overriding @EnableJpaRepositories 2014-01-09 11:14:18 +00:00
Dave Syer
c8152bfc70 SpringBootTestUtils->EnvironmentTestUtils 2014-01-09 10:56:33 +00:00
Dave Syer
478e655758 Change algorithm for determining active profile from external config
Instead of adding active prpfiles for every one we encounter, we need to
build up a complete "default" Environment and then ask it what the active
profiles are. Implemented in ConfigFileApplicationListener.

Fixes gh-198
2014-01-08 18:03:37 +00:00
Dave Syer
561cb3a50f TestUtils -> SpringBootTestUtils 2014-01-08 13:58:21 +00:00
Dave Syer
321ce3aad2 TestUtils -> SpringBootTestUtils 2014-01-08 10:46:42 +00:00
Dave Syer
147968cf83 Set isolation to DEFAULT for JPA transaction manager
Also logs a warning about the fact that locks may not be taken when
starting a Job. JPA and Batch don't really work that well together
in general so it's probably not worth a lot of effort to work aoround
this. If anyone needs to they should create a custom JpaDialect
(and a BatchConfigurer).

Fixes gh-197
2014-01-08 09:58:23 +00:00
Dave Syer
633dea9d80 Add declarative ApplicationListener 2014-01-07 17:53:34 +00:00
Dave Syer
441572c61c Migrate config file initializer to a listener 2014-01-07 17:52:46 +00:00
Dave Syer
3dacf4be17 Migrate Logging and Liquibase initializers to be listeners 2014-01-07 17:52:45 +00:00
Dave Syer
27ae6a5fd6 Add ApplicationListener as first class component in Spring Application 2014-01-07 17:52:45 +00:00
Phillip Webb
751beda2cb Additional fixes for auto-configuration report
Fix the following issues that were introduced in commit 0610378:

- Formatting of code including imports
- Improve hashcode/equals implementations by using ObjectUtils
- Provide hashcode/equals for ConditionOutcome
- Use LinkedHashSet in ConditionAndOutcomes to maintain insert order

Fixed gh-127
2014-01-06 10:52:33 -08:00
Greg Turnquist
0610378d2f Resolves #127: Prevent duplicate report outcomes
The collection of outcomes is a list. Sometimes a race condition causes to instances
of the same outcome to get added to the list shown in the report. By replacing this
with a set and propery equals/hashCode, duplicates are prevented from appearing
in the report.

I added test cases to prove that that POJO is properly managed inside a Set and also
to show that duplicates don't appear in the final report.
2014-01-06 10:42:16 +00:00
Dave Syer
c71322a0b2 Add a BatchConfigurer so the transaction manager can adapt to JPA
Autoconfiguration ordering has to be adjusted so that a DataSource is
available before an EntityManagerFactory is ever needed. Previously
the autoconfigs were accidentally loaded in the right order, but after
the change to BatchAutoConfiguration the order has to be explicit.

Fixes gh-189
2014-01-06 10:41:49 +00:00
Phillip Webb
1bcd3de7b5 Polish 2014-01-02 12:10:37 -08:00
Phillip Webb
7623c291a2 Attempt to fix failing CI build 2014-01-02 10:23:58 -08:00
Oliver Gierke
d39a8360b7 Added support to allow manually declaring a EntityManagerFactoryBean.
Added the necessary @ConditionalOnMissingBean annotations to allow selectively declaring an EntityManagerFactoryBean, a JpaVendorAdapter or a PlatformTransactionManager. Especially the first one might be necessary to make sure the persistence provider evaluates an orm.xml. This unfortunately rules out using the packages to scan feature of Spring's LCEMFB.

I've filed https://jira.springsource.org/browse/SPR-11260 to potentially remove the need for this workaround in Spring itself.
2013-12-28 13:34:45 +01:00
Dave Syer
fe1336edcc Add JobExplorer and JobOperator 2013-12-26 14:23:21 +00:00
Dave Syer
c94fb7fc53 Fix bizarre compiler error 2013-12-23 22:12:54 +00:00
Dave Syer
6c4ee0b05d Add PoolConfig to Redis 2013-12-23 12:28:24 +00:00
Dave Syer
fa507005cd Use ServletWrappingController for jolokia instead of Servlet
We get more control over the handling and in particular the registration
of the endpoint this way. It was practically impossible to disable the
AgentServlet bean when in a parent context of the management server
because of lifecyce issues - you don't know that the user wants a
separate management server until too late.

This approach also makes it possible to test with spring-test MVC
support.
2013-12-20 19:49:48 +00:00
Dave Syer
e2c962ac28 Switch to thymeleaf-spring4 2013-12-19 13:40:24 +00:00
Christian Dupuis
b694556483 Set JMX export on by default 2013-12-19 08:47:22 +01:00
Phillip Webb
dbec81cabe Disable jmx by default
Change JmxAutoConfiguration so that by default JMX exposure is not
enabled. This matches the Javdoc text.
2013-12-18 22:32:39 -08:00
Phillip Webb
7c57541d50 Filter duplicates from SpringFactories loading
Filter duplicate class names when loading spring.factories files. The
prevents errors if -source jars are included on the classpath.

fixes gh-161
2013-12-18 09:55:06 -08:00
Dave Syer
997b015d10 Split SecurityAutoConfiguration
Spring Security 3.2 has a new annotation @EnableWebMvcSecurity that we
should use if MVC is being used.
2013-12-17 17:17:05 +00:00
Dave Syer
72bfd4ce68 Protect HttpMessageConverters if MVC is not available 2013-12-17 17:17:05 +00:00
Dave Syer
3789424f22 Add JodaModule bean if detected on classpath
Fixes gh-146
2013-12-17 14:22:18 +00:00
Dave Syer
bdcb94a139 Remove initialization concerns fom HttpMessageConverters 2013-12-17 09:02:16 +00:00
Phillip Webb
513c6a1de2 Polish 2013-12-16 14:38:52 -08:00