Commit Graph

193 Commits (2c6231a0fc298ddee677acc72530682621ff9829)

Author SHA1 Message Date
Christian Dupuis 62e02d3d81 Add initialSize configuration property to datasource auto configuration
fixes #206
11 years ago
Christian Dupuis 1a44b3e676 Fix sorting of auto configuration classes on JDK 8 11 years ago
Dave Syer 2377bd9ec9 Don't load BatchAutoConfiguration at all if there is no JobLauncher
Fixes gh-204
11 years ago
Dave Syer b1db714c23 Allow @EnableGlobalMethodSecurity in a non webapp
Fixes gh-202
11 years ago
Dave Syer aebaa580db Add test for user overriding @EnableJpaRepositories 11 years ago
Dave Syer c8152bfc70 SpringBootTestUtils->EnvironmentTestUtils 11 years ago
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
11 years ago
Dave Syer 561cb3a50f TestUtils -> SpringBootTestUtils 11 years ago
Dave Syer 321ce3aad2 TestUtils -> SpringBootTestUtils 11 years ago
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
11 years ago
Dave Syer 633dea9d80 Add declarative ApplicationListener 11 years ago
Dave Syer 441572c61c Migrate config file initializer to a listener 11 years ago
Dave Syer 3dacf4be17 Migrate Logging and Liquibase initializers to be listeners 11 years ago
Dave Syer 27ae6a5fd6 Add ApplicationListener as first class component in Spring Application 11 years ago
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
11 years ago
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.
11 years ago
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
11 years ago
Phillip Webb 1bcd3de7b5 Polish 11 years ago
Phillip Webb 7623c291a2 Attempt to fix failing CI build 11 years ago
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.
11 years ago
Dave Syer fe1336edcc Add JobExplorer and JobOperator 11 years ago
Dave Syer c94fb7fc53 Fix bizarre compiler error 11 years ago
Dave Syer 6c4ee0b05d Add PoolConfig to Redis 11 years ago
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.
11 years ago
Dave Syer e2c962ac28 Switch to thymeleaf-spring4 11 years ago
Christian Dupuis b694556483 Set JMX export on by default 11 years ago
Phillip Webb dbec81cabe Disable jmx by default
Change JmxAutoConfiguration so that by default JMX exposure is not
enabled. This matches the Javdoc text.
11 years ago
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
11 years ago
Dave Syer 997b015d10 Split SecurityAutoConfiguration
Spring Security 3.2 has a new annotation @EnableWebMvcSecurity that we
should use if MVC is being used.
11 years ago
Dave Syer 72bfd4ce68 Protect HttpMessageConverters if MVC is not available 11 years ago
Dave Syer 3789424f22 Add JodaModule bean if detected on classpath
Fixes gh-146
11 years ago
Dave Syer bdcb94a139 Remove initialization concerns fom HttpMessageConverters 11 years ago
Phillip Webb 513c6a1de2 Polish 11 years ago
Phillip Webb 85fb1cba0b Rework HttpMessageConverters 11 years ago
Dave Syer b72002142d Split MessageConverters auto config out into separate class 11 years ago
Dave Syer c78973e375 MessageConverters -> HttpMessageConverters 11 years ago
Dave Syer 370501f4a9 Add test and fix bug in MessageConverters 11 years ago
Dave Syer c2b499c775 Support for @Beans of type HttpMessageConverter, and Jackson specific details
You can contribute additional HttpMessageConverters
by simply adding beans of that type in a Spring Boot
context. If a bean you add is of a type that would have been included
by default anyway (like MappingJackson2HttpMessageConverter for JSON
conversions) then it will replace the default value. A convenience
bean is provided of type MessageConverters (always available if you
use the default MVC configuration) which has some useful methods to
access the default and user-enhanced message converters (useful, for
example if you want to manually inject them into a custom
RestTemplate).

There are also some convenient configuration shortcuts for Jackson2.
The smallest change that might work is to just add beans of type
Module to your context. They will be registered with the default
ObjectMapper and then injected into the default message
converter. In addition, if your context contains any beans of type
ObjectMapper then all of the Module beans will be registered with
all of the mappers.
11 years ago
Christian Dupuis 2b16a4af39 Fix failing test due to change in JMX export default setting 11 years ago
Dave Syer c40d0aba0d Document switching off DispatcherServlet 11 years ago
Christian Dupuis 5c6a0fd472 Enabled JMX export auto configuration by default 11 years ago
Dave Syer 9c2b34f188 Allow default DispatcherServlet to be switched off more easily
All a user has to do now is declare a bean with name "dispatcherServlet".
11 years ago
Christian Dupuis b931cce386 Auto configuration support for JMX export 11 years ago
Dave Syer cf05a5d578 Fix @Conditional for Batch command line runner
Previously it was @ConditionalOnMissingBean(CommandLineRunner.class)
which caued obvious problems when user wanted to add an unrelated
CLR.

Extended feature set so that a JobRegistry can also be used (with
spring.batch.job.name) and the whole idea can be switched off with
spring.boot.job.enabled.
11 years ago
Dave Syer cf53b76430 Remove another annotation= attribute
Hopefully really fixes gh-151
11 years ago
Dave Syer ed8d161d33 Remove debug logging on stderr 11 years ago
Dave Syer 2543ef7072 Change @Conditional for existing security configuration
Fixed by using `WebSecurityConfiguration` to detect existing
security configuration (not the annotation).

Fixes gh-151
11 years ago
Dave Syer f57c8f52bf Check for null before trying to use ApplicationContext
Fixes gh-145
11 years ago
Dave Syer 33c38b3a51 Remove inaccurate TODO 11 years ago
Dave Syer 322b03779d Upgrade Thymeleaf and Spring 11 years ago