Commit Graph

614 Commits

Author SHA1 Message Date
Phillip Webb
1c1f36c4ce Add support for web-jar resources
Include resource mapping for web-jar resources.

Issue: #55752928
2013-09-05 17:14:13 -07:00
Phillip Webb
37d136dcb6 Add config file property sources after existing
Change ConfigFileApplicationContextInitializer to add config file
property sources after existing sources. This allows environment
variables and system properties to override file properties.

Issue: #55739594
2013-09-05 17:14:13 -07:00
Biju Kunjummen
21766b8183 Added Joda-time managed dependency 2013-09-05 17:14:13 -07:00
Phillip Webb
a95494fe61 Remove '/resources/**' mapping and default servlet
Remove '/resources/**' mapping since it can cause problems with the
'/**' when the developer defines their own 'resources' sub-folder.

Also remove default servlet config since the resources mapping renders
it redundant.

Issue: #55494446
2013-09-05 17:14:13 -07:00
Dave Syer
e294e67d12 Remove compiler warnings 2013-09-05 17:14:12 -07:00
Phillip Webb
6edc7570c1 Added 'Application started in XX seconds' logging
Added logging to INFO SpringApplication to log when the application has
fully started and how long it took to load.
2013-09-05 17:14:12 -07:00
Phillip Webb
cbb95e3e25 Update logging to check level is enabled 2013-09-05 17:14:12 -07:00
Phillip Webb
0fa0082b2a Support for liquibase in executable jars
Create LiquibaseServiceLocatorInitializer to replace the standard
liquibase classpath scanning logic with SpringPackageScanClassResolver
which will work correctly in Spring Boot packaged executable JARs.

Issue: #55580628
2013-09-05 17:14:12 -07:00
Phillip Webb
5e6260ec5a Polish pattern resolving in BeanDefinitionLoader 2013-09-05 17:14:12 -07:00
Phillip Webb
be79da139e Code formatting 2013-09-05 17:14:12 -07:00
Dave Syer
9e18183dd5 Don't set deefault password if empty or unresolved 2013-09-05 17:14:12 -07:00
Dave Syer
1e0e2e7102 Switch off CSRF filter
Might need to revisit later.
2013-09-05 17:14:12 -07:00
Dave Syer
43fc107437 Fix security config
The management endpoints were still all mixed up
with the user endpoints. Fixed that and extracted
user endpoints in to conditional block so not
protected if path explicitly set to empty string.

[#53029715]
2013-09-05 17:14:11 -07:00
Dave Syer
6498f0e8b8 Add logger for default password 2013-09-05 17:14:11 -07:00
Phillip Webb
f8f36ead42 Add sample yml to docs 2013-09-05 17:14:11 -07:00
Phillip Webb
2b54b6286f Rework database auto-configure
Rework several aspects of database auto-configuration:

- Use RelaxedPropertyResolver to obtain property values
- Extract EmbeddedDatabaseConnection from EmbeddedDatabaseConfiguration
- Rename several configuration classes for consistency

Issue: #53028397
2013-09-05 17:14:11 -07:00
Phillip Webb
2041a79970 Use RelaxedPropertyResolver in auto-configuration
Update several existing auto-configuration classes to use the new
RelaxedPropertyResolver.

This commit also rename the spring.template property to spring.thymeleaf
in case we wish to support more templating engines in the future.
2013-09-05 17:14:11 -07:00
Phillip Webb
0a7ac89984 Create RelaxedPropertyResolver
Create RelaxedPropertyResolver class that can be used to get values
from another PropertyResolver (probably an Environment) using the
same relaxed rules as the RelaxedDataBinder.

The commit extracts the relaxed naming rules from RelaxedDataBinder
into a new RelaxedNames class.

Issue: #55621278
2013-09-05 17:14:11 -07:00
Phillip Webb
d64a44547c Fix DataSourceConfiguration isTestOnReturn()
Fix setTestOnReturn to use isTestOnReturn.
2013-09-05 17:14:11 -07:00
Dave Syer
621116c9b8 ManagementServerConfiguration security
Management endpoints are still secure by default if
Spring Security is present, but now the default
user details have an ADMIN role, and a random password
(which is logged at INFO level if not overridden).

To override you add management.user.password (name, role)
to external properties.

[Fixes #53029715] [bs-203]
2013-09-05 17:14:10 -07:00
Dave Syer
c582fa2067 /info endpoint should be open by default
[#53029715] [bs-203] ManagementServerConfiguration security
2013-09-05 17:14:10 -07:00
Dave Syer
3c44fda782 Switch off ws sample tests 2013-09-05 17:14:10 -07:00
Dave Syer
05e678acb3 Clean out grapes 2013-09-05 17:14:10 -07:00
Dave Syer
5ead60a7e1 Comment out websocket sample (fails in CI) 2013-09-05 17:14:10 -07:00
Sergey Shcherbakov
0277ce7ab2 Added wildcard and property placeholder support in SpringApplication
* When a config source is a String it can now be a pattern
* Default resource loaded in the BeanDefinitionLoader has been
changed to PathMatchingResourcePatternResolver;
* A check for the ResourcePatternLoader similar to that in
AbstractBeanDefinitionReader and property placeholder resolution
has been added to the load(CharSequence) method of the
BeanDefinitionLoader;
* Added a unit test illustrating the issue;
2013-09-05 17:14:10 -07:00
Dave Syer
767aa43e31 Add WebSocketAutoConfiguration
Opinionated defaults for WebSockets:

* If spring-websocket is on the classpath and so is
the Tomcat WSci initializer then it is added to the context
* A DefaultSockJsService is added if none is present
* User has only to define @Beans of type WebSocketHandler with
name starting "/"
* Each one is converted to a SockJsHttpRequestHandler and
mapped to "/<beanName>/**"
2013-09-05 17:14:10 -07:00
Dave Syer
6e8cbbde3b Use reflection hack for error page in Tocmat 8 2013-09-05 17:14:10 -07:00
Sergey Shcherbakov
b4542f722f Support for embedded Tomcat 8 container parallel to the current Tomcat 7 2013-09-05 17:14:10 -07:00
ggerard
322b5e5c2b Typo (mvn -> curl) 2013-09-05 17:14:10 -07:00
Phillip Webb
94b182cc81 Allow hibernate naming strategy to be specified
Issue: #53028397
2013-09-05 17:14:09 -07:00
Biju Kunjummen
9d9b005c9f Fixed typo in LoggingApplicationContextInitalizer initializeLogLeve->initializeLogLevel 2013-09-05 17:14:09 -07:00
Biju Kunjummen
fa3b593568 Removed spring-boot related version from dependencies of samples 2013-09-05 17:14:09 -07:00
Dave Syer
d88e1b4b7a Add test case for ivy customization
A bug in ivy (tickled by maven leaving a pom
but no jar in the local repo) would make the
default Grapes ivy config fail (cannot grab...).
Phil's workaround now has a test case.
2013-09-05 17:14:09 -07:00
Phillip Webb
39aea5d944 Ensure localm2 ivy repo can resolve artifacts
Fix the localm2 repository to only consider that a pom exists when
its artifact is contained in the repository.

This prevents a download error that can occur when the local m2
repository contains a POM file but not a JAR.

Issue: #55532358
2013-09-05 17:14:09 -07:00
Phillip Webb
a10abffe9f Add MultiPartConfigFactory
Issue: #55528242
2013-09-05 17:14:09 -07:00
Phillip Webb
71946f9d83 Update WebMvcAutoConfiguration conditional bean
Change WebMvcAutoConfiguration to use WebMvcConfigurationSupport instead
of HanderAdapter as the @ConditionalOnMissingBean. This allows MVC to
be auto-configured even if you define additional HanderAdapters.

Issue: #55493342
2013-09-05 17:14:09 -07:00
Phillip Webb
d4fe320254 Update trace logging to include Hibernate SQL 2013-09-05 17:14:09 -07:00
Phillip Webb
6858c3987e Use Hibernate ImprovedNamingStrategy by default
Update HibernateJpaAutoConfiguration to use the ImprovedNamingStrategy
for better table and column names.

Issue: #55261888
2013-09-05 17:14:08 -07:00
Phillip Webb
7e3cb50a22 Polish 2013-09-05 17:14:08 -07:00
Phillip Webb
021fe45d83 Exclude spring-data-rest package from being stored
Update AutoConfigurationUtils to specifically exclude spring-data-rest
packages from being stored. This prevent missing class errors caused
when Spring Boot attempts to use @ComponentScan packages as the source
for JPA entities and reads annotations that are not on the classpath.

Issue: #55489346
2013-09-05 17:14:08 -07:00
Phillip Webb
fc841e0269 Move inner class to end of file for consistency 2013-09-05 17:14:08 -07:00
Dave Syer
bd45d68a63 Rename SpringServletInitializer
[Fixes #55388726] [bs-292]
2013-09-05 17:14:08 -07:00
Dave Syer
b720f7e688 Startup time for CLI app much quicker now
The Boot resolver didn't transfer enough of the settings
of the default ChainResolver. Adding a boolean flag was
enough to make the chatter die down for dependencies
that were unneeded.

[Fixes #55358344] [bs-291]
2013-09-05 17:14:08 -07:00
Phil Webb
3690ab16ba Fix README.md typo 2013-09-05 17:14:08 -07:00
Dave Syer
0993f3da0a Restore Tomcat in CLI
Seems to work. I think the problem was the race conditions
that we hopefully already eliminated. I got an out of memory
error running the samples tests in Eclipse, but then it went
away again (something to look out for).

[Fixes #54925992] [bs-280]
2013-09-05 17:14:08 -07:00
Dave Syer
52144fbbb6 Remove commons-logging dependency for starter projects 2013-09-05 17:14:08 -07:00
Dave Syer
d205d9404a Add additional ViewResolver configuration
The DispatcherServlet adds a default InternalViewResolver
which was used by some apps, but when the actuator was
available it added an "/error" bean and effectively
switched off the default view resolver. The net fix was
to add an InternalViewResolver at the same time as
adding any other ViewResolvers.

[Fixes #55357516] [bs-290] Actuator UI app cannot serve static index.html
2013-09-05 17:14:08 -07:00
Dave Syer
4c4e013c5e Avoid NPE in error controller 2013-09-05 17:14:08 -07:00
Phillip Webb
3fc8752a37 Update autoconfigure README.md with --debug info 2013-09-05 17:13:36 -07:00
Phillip Webb
840fdeb50f Create common SpringBootCondition base class
Create a new SpringBootCondition that will log why a condition has
or has not been applied. The removes the need for ConditionLogUtils
and simplifies many of the existing condition implementations.

Issue: #55203236
2013-09-05 17:13:36 -07:00