Commit Graph

798 Commits

Author SHA1 Message Date
Andy Wilkinson
f9221e24ef Polish method name in HibernateJpaAutoConfiguration 2014-11-11 12:37:34 +00:00
Stephane Nicoll
109c3a3439 Auto configure CharacterEncodingFilter
Provide a default UTF-8 encoding for HTTP requests and responses unless
specified otherwise.

Fixes gh-1182
2014-11-11 12:01:15 +01:00
Phillip Webb
143a62b6bf Polish 2014-11-10 23:03:15 -08:00
Phillip Webb
3e1841a53b Remove JpaBaseConfiguration.configure() method
Remove the JpaBaseConfiguration.configure() method since it is no
longer called.

Fixes gh-1865
2014-11-10 21:53:24 -08:00
Phillip Webb
5811f6e3f5 Merge branch '1.1.x' 2014-11-10 19:01:59 -08:00
Phillip Webb
4f67a20214 Ensure JpaUserDetailsTests closes embedded DB
Fixes gh-1712
2014-11-10 18:43:46 -08:00
Phillip Webb
b79934a7a4 Detect existing MultipartResolver beans
Update MultipartAutoConfiguration to detect any MultipartResolver beans
rather than just StandardServletMultipartResolvers.

Fixes gh-1857
2014-11-10 17:21:21 -08:00
Phillip Webb
8023ddd0c2 Rename AbstractBasicTemplateViewResolverProperties
Rename AbstractBasicTemplateViewResolverProperties to
AbstractViewResolverProperties.

See gh-1835
2014-11-07 09:24:07 -08:00
Stephane Nicoll
6d9abdc8ca Harmonize view resolver properties
Move shared properties to avoid duplication in GroovyProperties

Fixes gh-1835
2014-11-07 13:19:40 +00:00
Phillip Webb
e76a571dd3 Add @SpringBootApplication annotation
Add a new @SpringBootApplication which is equivalent to @Configuration,
@EnableAutoConfiguration and @ComponentScan.

See gh-1842
2014-11-06 22:49:10 -08:00
Phillip Webb
96a031cf20 Default spring.datasource.jmx-enabled to false
Change the default value of spring.datasource.jmx-enabled to false
to prevent InstanceAlreadyExistsException problems when using the
Spring Test Framework.

Fixes gh-1590
2014-11-06 21:38:07 -08:00
Phillip Webb
58d660d10d Allow DAO ExceptionTranslator to proxy classes
Update the auto-configured PersistenceExceptionTranslationPostProcessor
to proxy target classes as well as interfaces. Also provide a config
property to disable registration all together.

Fixes gh-1844
2014-11-06 19:13:50 -08:00
Michael Cramer
f966b3b1b7 Provide Liquibase -> Commons Logging adapter
Add `CommonsLoggingLiquibaseLogger` implementation to adapt Liquibase's
`Logger` to Apache Commons Logging.

The `LiquibaseAutoConfiguration` class has also been updated to
automatically use the adapter

Fixes gh-1840
2014-11-06 13:26:06 -08:00
Phillip Webb
ba0dd60de9 Rename charSet to charset
Rename AbstractTemplateViewResolverProperties.setCharSet/getCharSet to
setCharset/getCharset, deprecating the old method.

Fixes gh-1835
2014-11-05 16:57:05 -08:00
Phillip Webb
b6bacd5e8a Upgrade to Servlet 3.1, Tomcat 8 and Jetty 9
Upgrade to latest versions of Tomcat and Jetty and to the latest Servlet
API whilst will remaining compatible with Tomcat 7 and Jetty 8.

Fixes gh-1832, gh-369
2014-11-05 16:35:34 -08:00
Phillip Webb
edaed415fb Polish 2014-11-04 09:09:26 -08:00
Stephane Nicoll
9dec27e7bf Permit to disable JTA using a single property
Disable JTA auto-configuration altogether with a simple property. This
can be useful if the environment is JTA capable but the application does
not require it.

Fixes gh-1457
2014-11-04 16:53:54 +01:00
Stephane Nicoll
814803046a polishing 2014-11-04 16:31:37 +01:00
Stephane Nicoll
47cd9e0765 Fix ConditionalOnJndi evaluation
Enable ConditionalOnJndi evaluation and add tests that validate it works
as expected

Fixes gh-1820
2014-11-04 15:42:30 +01:00
Stephane Nicoll
cbd3c39640 Override StringHttpMessageConverter with UTF-8
Override the default StringHttpMessageConverter provided by the standard
Spring MVC configuration so that is uses UTF-8 instead of the aging
default of the servlet spec (that is ISO-8859-1)

Fixes gh-1800
2014-11-04 13:12:19 +01:00
Phillip Webb
43c07e8b44 Protect against duplicate datasource MBeans
See gh-1590
2014-11-03 18:49:27 -08:00
Phillip Webb
a973fd41f4 Polish 2014-11-03 18:49:20 -08:00
Dave Syer
f304d46955 Add JMX MBean for Tomcat DataSource
If the DataSource is a Tomcat one we force it to register an MBean
if spring.jmx.enabled=true

Fixes gh-1590
2014-11-03 13:38:05 +00:00
Dave Syer
3e97cdbc3b Trim some fat from groovy templates
The old resolver class is deprecated already, and there's no reason
to continue to support the View and View resolver implementations
from Boot 1.1, so I removed those. Also there is no need to support
older versions of Groovy, so I removed a config class that was
conditional on a groovy version (by looking for the markup support).

Fixes gh-1578
2014-11-03 09:59:25 +00:00
Brian Clozel
18b8929335 Migrate to groovy templates from Spring 4.1
Update `GroovyTemplateAutoConfiguration` to use Spring 4.1 Groovy
Markup Template infrastructure instead of Boot's.

Fixes gh-1552
2014-11-03 09:59:25 +00:00
Stephane Nicoll
a46396f691 Add @NestedConfigurationProperty meta-data support
Add a @NestedConfigurationProperty annotation which can be used to
customize how configuration mete-data is generated.

Prior to this commit only inner-classes where considered nested
(see Tomcat in ServerProperties). Using this new annotation, the Ssl
property in ServerProperties can be detected as well.

See gh-1001
2014-11-02 21:46:36 -08:00
Stephane Nicoll
fbf8f56a97 Generate standard configuration meta-data
Update the `spring-boot`, `spring-boot-autoconfigure` and
`spring-boot-actuator` project to generate configuration meta-data
files during compilation.

See gh-1001
2014-11-02 21:46:36 -08:00
Phillip Webb
45b579c439 Improve OnBeanCondition Performance
Update OnBeanCondition to use a new BeanTypeRegistry which includes
optimized code when using a DefaultListableBeanFactory. The optimized
version calculates bean types only once per bean and caches the result.

Prior to this change the sample "pet clinic" application would spend
400-500 milliseconds evaluating OnBeanConditions, after this change it
spends around 120 milliseconds.

Fixes gh-1803
2014-11-02 13:55:06 -08:00
Phillip Webb
a490aef888 Merge remote-tracking branch 'springsource/1.1.x'
Conflicts:
	spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java
2014-11-01 19:47:47 -07:00
Phillip Webb
8ba71c88f5 Polish 2014-11-01 19:46:04 -07:00
Dave Syer
b20d02a31d Make a lazy AuthenticationManager if we think it's already configured
Instead of just blindly creating the default authentication manager, after
thic change we count the beans of type GlobalAuthenticationManagerConfigurer
and assume that if we detect more than we expect (one from Boot and one from
Spring Security) then the user is telling us they want to configure the
AuthenticationManager themselves.

Fixes gh-1801
2014-11-01 18:10:27 +00:00
Phillip Webb
8e16dfc951 Polish 2014-11-01 08:20:12 -07:00
Dave Syer
f15cb7a720 Add tests for AuthenticationManager injected into security configurer
See gh-1801
2014-11-01 08:58:46 +00:00
Andy Wilkinson
36ffad2bb7 Merge branch '1.1.x' 2014-10-30 15:21:55 +00:00
Andy Wilkinson
0f17142366 Make GroovyWebConfiguration conditional on spring-webmvc's availability
GroovyWebConfiguration creates a GroovyTemplateViewResolver which is
a UrlBasedViewResolver sub-class. UrlBasedViewResolver is provided
by spring-webmvc. Previously, if a user configured a web application
but did not have spring-webmvc on the classpath, the application
would fail to start with a NoClassDefFoundError for
UrlBasedViewResolver.

This commit makes GroovyWebConfiguration conditional on
UrlBasedViewResolver being on the classpath so that it backs of in
the absence of spring-webmvc.

Fixes gh-1793
2014-10-30 15:18:39 +00:00
Andy Wilkinson
0cdb1d3f22 Make Spring Security's filter's order configurable and default to zero
Previously, Spring Security's filter had no configured order. Due to
the use of AnnotationAwareOrderComparater this meant that its order
defaulted to LOWEST_PRECEDENCE. This meant that a user had to declare
a FilterRegistrationBean for the filter and explicitly set its order
if they want another filter to run after Spring Security's.

This commit updates the security auto-configuration to assign a
default order of zero to Spring Security's filter, allowing filters
to be easily configured to run before it or after it. This default
value can overridden using the server.filter-order property. The
default order is also exposed as a constant on SecurityProperties,
allowing it to be referenced from other filter declarations.

Closes gh-1640
2014-10-30 14:11:45 +00:00
Phillip Webb
d17b7c8195 Polish 2014-10-29 12:08:37 -07:00
Andy Wilkinson
466ed469eb Merge branch '1.1.x' 2014-10-29 17:52:30 +00:00
Andy Wilkinson
e2dd659dd1 Include condition's location (class or method name) in message
Closes gh-1787
2014-10-29 17:51:17 +00:00
Andy Wilkinson
8a1e010d0a Allow multiple templateLoaderPaths to be configured for FreeMarker
Closes gh-1767
2014-10-29 17:42:48 +00:00
Andy Wilkinson
ef2455938e Align new JavaMail dependencies with Spring IO Platform
Spring IO Platform already provides dependency management for JavaMail.
This commit updates Boot’s new JavaMail dependency management to align
with the Platform, thereby allowing the Platform to inherit Boot’s
dependency management instead of defining its own.
2014-10-29 17:05:48 +00:00
Stephane Nicoll
429da743f5 Add missing close 2014-10-29 15:44:53 +01:00
Stephane Nicoll
ccc5e65779 Add email support
This commit adds a new starter to auto-configure a MailSender when the
necessary classes are present and when the property "spring.mail.host" is
set.

The auto-configuration also accepts any arbitrary properties that
JavaMail might need using the "spring.mail.properties" prefix.

Fixes gh-1760
2014-10-29 15:39:05 +01:00
Sebastien Deleuze
7546f10aad Fix a typo in error.whitelabel.enabled 2014-10-29 08:56:12 +01:00
Dave Syer
015377f9de Exclude log4j in a couple of places (see gh-1660)
also rename spring-cloud starter
2014-10-28 15:57:14 +00:00
Andy Wilkinson
cebfd44d16 Upgrade to Spring AMQP 1.4.0.RC1 2014-10-28 13:49:52 +00:00
Dave Syer
f39d4978c3 Fix tests for JSON error rendering
See gh-1762
2014-10-27 15:06:32 +00:00
Dave Syer
254ab55476 Re-arrange priority of error message 2014-10-27 11:08:53 +00:00
Dave Syer
7bac7370c8 Use request attribute if available for error message
Fixes gh-1762, gh-1731
2014-10-27 10:50:10 +00:00
Phillip Webb
2e7aa4685b Polish 2014-10-21 20:34:00 -07:00