Commit Graph
714 Commits
Author SHA1 Message Date
Phillip Webb 379857a111 Detect SpringBootServletInitializer @Configuration
Update SpringBootServletInitializer to automatically add itself as a
SpringApplication source if it is annotated with @Configuration.

Also throw a more meaningful exception if no sources have been
configured.

Fixes gh-2073
2014-12-05 22:58:50 -08:00
Phillip Webb b253cbec2d Polish 2014-12-05 10:54:36 -08:00
Phillip Webb af643e2f54 Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
2014-12-05 10:25:30 -08:00
Phillip Webb c9a3919af9 Add LoggingApplicationListener constants
Extract some of the common property keys as constants.

Fixes gh-2068
2014-12-05 10:23:55 -08:00
Phillip Webb 78c22813d3 Ensure undertow session cookie path is correct
Explicitly set a ServletSessionConfig when the context path is "". This
is a workaround for UNDERTOW-350 to ensure that the session cookie path
is correctly set.

Fixes gh-2065
2014-12-05 09:51:28 -08:00
Phillip Webb 778aa39016 Add Undertow WebSocket auto-configuration
Fixes gh-2028
2014-12-03 15:35:19 -08:00
Phillip Webb 9e394eac22 Fix YamlPropertySourceLoader flatten logic
Fix YamlPropertySourceLoader to correctly flatten keys merged from
different documents.

Closes gh-2022
2014-12-03 09:40:24 -08:00
Dave Syer 0b19884f58 Remove unecessary reflection hacks 2014-12-03 15:11:17 +00:00
Phillip Webb 4c7cc58a19 Correct ApplicationPidFileWriter property javadoc
Fixes gh-2041
2014-12-02 17:40:41 -08:00
Phillip Webb 39ee583977 Retain YAML property ordering
Update YamlPropertySourceLoader to use a MapPropertySource rather than
a PropertiesPropertySource to ensure that the underlying order is
retained.

Fixes gh-2022
2014-12-02 17:31:50 -08:00
Phillip Webb 1a5735191f Warn on @ComponentScan of default package
Add ConfigurationWarningsApplicationContextInitializer to report
warnings for common configuration mistakes. Currently the initializer
will log a warning if @ComponentScan is used on a @Configuration class
in the "default" package.

Fixes gh-2050
2014-12-02 15:19:52 -08:00
Phillip Webb 447c9ff204 Polish 2014-12-02 15:19:51 -08:00
Andy Wilkinson 0a8bc482fa Add documentation for Ssl properties
Closes gh-2049
2014-12-02 17:48:46 +01:00
Stephane Nicoll 4ce621951c Add debug property to meta-data
Closes gh-2044
2014-12-02 14:57:49 +01:00
Phillip Webb 09dac5ff00 Apply formatting and cleanup rules 2014-12-01 19:35:03 -08:00
Phillip Webb 48db5457f1 Polish 2014-12-01 19:32:05 -08:00
Phillip Webb 53637eaa7c Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
2014-12-01 14:19:08 -08:00
Phillip Webb b519eda441 Make ErrorPageFilter public
Change the visibility of ErrorPageFilter to public to fix
IllegalAccessException errors on certain servlet containers.

Fixes gh-2026
2014-12-01 14:13:44 -08:00
Phillip Webb ffe5348083 Polish formatting 2014-12-01 13:46:06 -08:00
Dave Syer 843e6d7cfa Add 2 more JsonParser implementations 2014-12-01 13:41:13 +00:00
Stephane Nicoll 65e9d6a6e0 Add property description
Set the field javadoc of many properties that are managed via
configuration so that the "description" field is available in the
meta-data.

Closes gh-1808
2014-11-27 14:23:27 +01:00
Stephane Nicoll c05b387457 Add metadata for logging.level
Closes gh-1992
2014-11-24 21:22:25 +01:00
Stephane Nicoll 2f4a46a180 Associate logging.* properties to group 2014-11-21 17:43:32 +01:00
Phillip Webb eb035398b2 Add SqlScriptsTestExecutionListener
Update @IntegrationTest to include SqlScriptsTestExecutionListener.

Fixes gh-1965
2014-11-20 12:12:27 -08:00
Phillip Webb 2a8579026f Polish 2014-11-20 10:16:33 -08:00
Dave Syer 08ddbe79cd Add GsonJsonParser 2014-11-20 17:53:38 +00:00
Stephane Nicoll 11894a5412 Fix manual metadata format inconsistency
Fixes gh-1961
2014-11-20 13:58:39 +01:00
Dave Syer 23e7028abb Ensure java.io.tmpdir is available before using it
Some environments do not have a tmpdir so it can be null.
2014-11-20 12:01:24 +00:00
Andy Wilkinson d0f43d2e2b Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/logback/LogbackLoggingSystem.java
	spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java
2014-11-20 10:50:34 +00:00
Andy Wilkinson 59ebc3b320 When Logback is the logging system, ensure that JBoss logging uses it
Previously, if Logback was being used as Boot's logging system, but
Log4J was also on the classpath before SLF4J and Logback, JBoss
Logging would use Log4J for its logging. This lead to warning messages
being produced as Log4J was not configured:

log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.

This commit updates LogbackLoggingSystem to set the
org.jboss.logging.provider to "slf4j". This ensure that JBoss Logging
will use SLF4J and Logback as intended even when Log4J is also on the
classpath.

Closes gh-1928
2014-11-20 10:41:43 +00:00
Phillip Webb a641f0c72a Polish 2014-11-18 15:45:14 -08:00
Phillip Webb a6e4744c60 Fixup line endings 2014-11-18 15:43:39 -08:00
Phillip Webb b583262211 Use SmartInitializingSingleton when possible
Switch implementations of ApplicationListener<ContextRefreshEvent> for
SmartInitializingSingleton when possible.

Fixes gh-1939
2014-11-18 13:50:49 -08:00
Andy Wilkinson 7a783f5a18 Merge branch '1.1.x' 2014-11-18 21:31:19 +00:00
Andy Wilkinson 863c099161 Add missing copyright headers 2014-11-18 21:29:54 +00:00
Andy Wilkinson 1864d79077 Polish Undertow contribution
Closes gh-1779
2014-11-18 21:20:34 +00:00
sopov.ivan c501b889af Add support for using Undertow as an embedded container
See gh-1779
2014-11-18 21:20:34 +00:00
sopov.ivan 72dd75b66e Add Jetty SSL keystore in classpath test
Update JettyEmbeddedServletContainerFactoryTests to test loading an
SSL keystore from the classpath. Currently this is a Jetty only feature,
although if https://issues.apache.org/bugzilla/show_bug.cgi?id=56777 is
fixed we could do the same thing with Tomcat.

Closes gh-1943
2014-11-18 12:21:17 -08:00
Phillip Webb 6efa2d5315 Merge branch '1.1.x' 2014-11-18 12:05:44 -08:00
Phillip Webb 0408eb413f Add profile to ConfigFileApplicationListener log
Fixes gh-1948
2014-11-18 12:04:46 -08:00
Phillip Webb 4668f59723 Improve relaxed enum binding
Update RelaxedConversionService to support more relaxed enum binding.

Fixes gh-1950
2014-11-18 11:24:32 -08:00
Andy Wilkinson d246dee6d6 Merge branch '1.1.x' 2014-11-18 10:43:14 +00:00
Andy Wilkinson 6ab47db19d Omit null pathInfo from ErrorPageFilter's error message
Fixes gh-1944
2014-11-18 10:41:27 +00:00
Andy Wilkinson 8635724521 Merge branch '1.1.x' 2014-11-18 10:25:23 +00:00
Andy Wilkinson 41cb567894 Don't flush in ErrorPageFilter for < 400 response that's committed
Previously, for a non-async response with a successful status (< 400),
ErrorPageFilter would always call flushBuffer. This triggers an
exception in Tomcat if the client has closed the connection before the
response has been fully sent. In this case, Tomcat treats the response
as successful and commits it before control returns to the filter.

This commit updates ErrorPageFilter to only perform the flush if the
response has not already been committed, leaving any further flushing
that may be necessary to be handled by the servlet container.

Fixes gh-1938
2014-11-18 10:23:55 +00:00
Andy Wilkinson 05cf686713 Allow servlet context parmeters to be configured via declaratively
Previously, configuration of a ServletContext init parameter required
the use of a ServletContextInitializer bean. This commmit adds
support for declarative configuration via the environment using
server.context_parameters.<name>=<value>.

Closes gh-1791
2014-11-17 20:20:08 +00:00
Andy Wilkinson bebf26d91e Restore compatibility with Jetty 8 when SSL is being used
ServerConnector is in different packages in Jetty 8 and Jetty 9 which
was leading to a NoClassDefFounderError when SSL was used with
Jetty 8.

This commit updates SslServerConnectorFactory to return an
AbstractConnector, a super class of ServerConnector, that is in the
same package in both Jetty 8 and Jetty 9. This class does not provide
a setPort method so the setting of the port has been pushed down into
the SslServerConnectorFactory implementation.

SSL samples for both Jetty 8 and Jetty 9 have been added to verify
SSL with both supported versions of Jetty.

Closes gh-1925
2014-11-17 17:18:31 +00:00
Stephane Nicoll 16e2130896 Add missing properties metadata
Fixes gh-1829
2014-11-17 15:58:08 +01:00
Phillip Webb 37d0b1a64d Fix @IntegrationTest context caching
Add an additional "IntegrationTest" property to @IntegrationTests
to ensure that they get a different MergedContextConfiguration which
is used as a context cache key.

Fixes gh-1909
2014-11-13 14:28:20 -08:00
Phillip Webb 4840d2c88c Restore spring.main.disable_banner=fase support
Fixes gh-1918
2014-11-13 13:48:34 -08:00