Commit Graph

285 Commits

Author SHA1 Message Date
Phillip Webb
fcea565433 Polish javadoc formatting 2014-03-15 13:02:02 -07:00
Phillip Webb
80ac1fb0cd Polish 2014-03-15 13:02:01 -07:00
Phillip Webb
12d2331f4d Fix failing JMS test
Fix test failure caused by URL -> Url rename in
commit 22e397cda2
2014-03-13 13:59:54 -07:00
Phillip Webb
22e397cda2 Polish 2014-03-13 13:11:54 -07:00
Dave Syer
3d43771136 Register an AuthenticationManager in security autoconfig
This is quite a big step, but I think it helps a lot. Since Spring
Boot always creates an AuthenticationManager if it doesn't find one
already registered, it makes sense to also make it into a @Bean.
Spring Security does not register its AuthenticationManager by
default though, so we have to do that for it if the user has created
one with an @Autowired AuthenticationManagerBuilder, but not registered
it as a @Bean.

Having the @Bean (marked @Primary to prevent issues with @Autowired)
makes it easier to reason about what Spring Boot has done for you, and
easier to default in simple use cases to the boot-created
AuthenticationManager. For example, if I want an OAuth2 Authorization
Server with password grant, it makes total sense for the
AuthenticationManager for users to be the same as the @Primary one.
Now it is easy to set that up (just @Autowire it).
2014-03-13 12:02:34 +00:00
Dave Syer
85a56a79e4 Tidy up implementation of DispatcherServletAutoConfiguration
also adds another test.
2014-03-13 11:08:27 +00:00
Dave Syer
659d7b6df1 Extend DefaultDispatcherServletCondition to check for a registration
...bean with no explicit @Bean DispatcherServlet. We still have to check
by bean name (slightly unfortunate, but we need to avoid instantiating
too early) so there's now another magic
bean name for the registration bean ("dispatcherServletRegistration")
that the user has to replace if he wants the registration without
defining a servlet @Bean

Fixes gh-482
2014-03-13 09:33:29 +00:00
Dave Syer
14d52b6c18 Avoid creating a new EmbeddedServletContainerFactory for websockets
User can now also switch off and customize the websockets customizer by adding
a bean named "websocketContainerCustomizer".

Fixes gh-479
2014-03-12 09:21:07 +00:00
Piotr Maj
1b167f630c Support for maxWait, jdbcInterceptors and validationInterval
Fixes gh-470
2014-03-10 17:08:04 +00:00
Piotr Maj
cb6739b4a5 Added testWhileIdle etc.
Fixes gh-463
2014-03-09 21:22:14 +00:00
Andy Piper
7b4fa22b40 Fix typo 2014-03-08 15:53:21 +00:00
Dave Syer
c68902260e Change explicit bean type to concrete NamedParameterJdbcTemplate
Fixes gh-447
2014-03-07 11:06:58 +00:00
Josh Long
9453a6324a polishing documentation 2014-03-07 11:04:41 +00:00
Dave Syer
a0ba8c90a6 Add MultipartConfig to DispatcherServlet by default
RC4 added a ServletRegistrationBaen for teh DispatcherServlet and we
didn't register a MultipartConfigElement if one was present.

Fixes gh-427
2014-03-05 09:30:18 +00:00
Dave Syer
ffe91ca6bf Change exception message for missing Thymeleaf templates
Fixes gh-424
2014-03-05 09:07:15 +00:00
Dave Syer
6b83e0ad5d Change bean name of ContentNegotiatingViewResolver
Fixed gh-428
2014-03-05 08:56:53 +00:00
Dave Syer
b56bd0a10c Add ViewResolver docs 2014-03-04 22:17:50 +00:00
Dave Syer
3bc37ddde0 Strip out most of websocket autoconfig
... leaving only the embedded Tomcat enabling feature (registering
the WsSci).

Fixes part of gh-65
2014-03-04 16:25:10 +00:00
Spring Buildmaster
b0d4e8ae69 Next development version 2014-03-03 22:46:12 -08:00
Spring Buildmaster
cb8668a151 Release version 1.0.0.RC4 2014-03-03 22:46:05 -08:00
Phillip Webb
99350a2216 Tidy ConfigurableEmbeddedServletContainerFactory
Rename ConfigurableEmbeddedServletContainerFactory to
ConfigurableEmbeddedServletContainer and extract
AbstractConfigurableEmbeddedServletContainer from
AbstractEmbeddedServletContainerFactory.
2014-03-03 21:10:56 -08:00
Phillip Webb
3f9ca68812 Tweak ConfigurableEmbeddedServletContainerFactory
Update ConfigurableEmbeddedServletContainerFactory to no longer directly
extend EmbeddedServletContainerFactory.
2014-03-03 18:39:18 -08:00
Phillip Webb
9c4dc0c68f Drop getPort from ConfEmbServletContainerFactory
Remove getPort() from ConfigurableEmbeddedServletContainerFactory to
keep the interface primarily setters.
2014-03-03 18:10:08 -08:00
Phillip Webb
468728a2c0 Polish 2014-03-03 17:50:19 -08:00
Dave Syer
07b88630f4 Be defensive with auto-config of Servlet 3.0 features
There's no explicit support for older Servlet specs in Spring Boot,
but we can at least make it easy for others to provide such
support by not adding stuff to the context when in an older container.
2014-03-03 18:08:38 +00:00
Dave Syer
b0b7bc0e7f Fix tests
Some assumptions were being made in tests, e.g. about
there being an AuthenticationManager @Bean, which were
false with the new Security 3.2.1 updates from Rob.

Also parent-child contexts with the actuator were
problematic because they didn't exclude the web configuration
for the management security in the parent context.

Fixes gh-244
2014-03-03 12:22:36 +00:00
Rob Winch
6b0eba3759 Update to Spring Security 3.2.1
Also change strategy for defaulting of Authentication. Spring
Boot authentication defaults are now encapsulated and can easily
be overridden by a user defined AuthenticationManager.
2014-03-03 12:21:37 +00:00
Dave Syer
29982f5946 Add @Configuration to WebMvcAutoConfigurationAdapter 2014-02-26 17:02:38 +00:00
Phillip Webb
083cb388c0 Upgrade to Spring Security 3.2.1
Fixes gh-392
2014-02-24 21:54:33 -08:00
Oliver Gierke
af458cb253 Upgrade to Spring Data Codd GA release.
Adapt auto-configuration code to use the new constructor introduced
in Spring Data Commons' AnnotationConfigurationSource.

Fixes gh-365
2014-02-24 14:06:37 -08:00
Phillip Webb
cf23b519d2 Polish 2014-02-24 13:43:54 -08:00
Dave Syer
8947307702 Add retry and parameter increment logic to job runner
The existing behaviour of JobLauncherCommandLineRunner was really too
basic. It has now been enhanced (at the expense of duplicating a lot
of code in Spring Batch it seems) to automatically increment job
parameters if it can, and to retry a failed or stopped execution
if it can (without incrementing, but with additional job parameters
added from command line if they are non-identifying).

The JobLauncherCommandLineRunner is more extendable and exposes
its DI wiring points now as well, so hopefully users can make
use of it independently of autoconfig (by providing a @Bean of
that type).

Not everything from the wishlist in gh-325 is implememented yet,
but it should be a good platform to work with and to extend.
2014-02-24 18:15:20 +00:00
Dave Syer
09f3ee14a4 Skip unnecessary attempt at executing Job
...that was already executed as part of the "local" set.

Also added some howto docs on executing Batch jobs.

See gh-382
2014-02-24 14:56:17 +00:00
hoserdude
3ad6c96ce5 Adding support for multiple configured job names 2014-02-24 14:33:08 +00:00
Dave Syer
f38a36ff70 Fail on startup if Thymeleaf template directory missing
Better even than logging would be to fail fast? Surely it's a
mistake not to have any /templates if Thymeleaf is in use.
User can disable failfast by exlcuding thymeleaf configuration
or by providing their own ITemplateResolver.

Fixes gh-294
2014-02-24 09:53:07 +00:00
Dave Syer
8d9c26b2df Switch default to fail on error in SQL initialization
User can switch the behaviour on and off with
spring.datasource.continueOnError:true|false. I decided
not to add an extra nested level of property resolution
because of the existing spring.datasource.schema
(and other properties relating to initialization) because
concision seemed like a good thing with those more common
settings.

Fixes gh-374
2014-02-24 09:30:21 +00:00
Christian Dupuis
b2327cb5f9 Fix comment 2014-02-20 17:44:23 +01:00
Dave Syer
b2b487ee5f Add ServletRegistrationBean for DispatcherServlet
Mapping is exposed via server.servletPath.

Fixes gh-379
2014-02-20 09:49:24 +00:00
Dave Syer
44b877cd7d Remove @ConditionalOnBean(DataSource.class) from JPA config
Stacktrace is then obviously about DataSource, not EntityManager.

Fixes gh-375
2014-02-20 09:09:50 +00:00
Dave Syer
6631dd025c Ensure DispatcherServlet is available in a deployed WAR
The DispatcherServletAutoConfiguration had a condition on it that
meant it wasn't used at all if there was no EmbeddedServletContainerFactory.
It's amazing that any WAR ever deployed.

Also added some info logging to servlet and filter registrations.
2014-02-19 13:41:08 +00:00
Jakub Kubrynski
5d591edbf8 Consider FactoryBean classes in OnBeanCondition
Update OnBeanCondition to attempt to consider FactoryBean classes
for bean type matches. To ensure early instantiation does not occur, the
object type from the FactoryBean is deduced by resolving generics on the
declaration.

Fixes gh-355
2014-02-17 13:34:03 +00:00
Dave Syer
fc4aabde75 Add some test cases and comments
In response to gh-352
2014-02-14 18:50:36 +00:00
Spring Buildmaster
1367d57e8c Next development version 2014-02-13 13:19:12 -08:00
Spring Buildmaster
eaff1677a7 Release version 1.0.0.RC3 2014-02-13 13:18:56 -08:00
Phillip Webb
4a58171b5c A few more package tweaks
Improve package structure and include package-info javadoc.
2014-02-12 13:50:37 -08:00
Oliver Gierke
929bd902be Upgraded to Spring Data Codd
Update AbstractRepositoryConfigurationSourceSupport to use the newly
introduced RepositoryConfigurationDelegate instead of effectively
reimplementing Spring Data Commons functionality which was prone to
changes in the API (code that wasn't considered to be API in the first
place).

Switch from implementing BeanClassLoaderAware to ResourceLoaderAware
to avoid having to set up a DefaultResourceLoader which should also
improve IDE integration.

Fixes gh-236
2014-02-12 01:18:58 -08:00
Phillip Webb
ed9735361e Apply source cleanup and formatting 2014-02-05 22:53:28 -08:00
Phillip Webb
80f2336f17 Polish 2014-02-05 22:31:56 -08:00
Phillip Webb
0b7eda89d4 Don't eagerly initialize FactoryBeans
Fix `EmbeddedServletContainerAutoConfiguration` so that it does not
accidentally eagerly initialize factory beans.

Fixes gh-306
2014-02-05 20:24:21 -08:00
Phillip Webb
8763fab0e7 Extract inner configuration property classes
Extract all inner @ConfigurationProperties classes from @Configuration
classes for consistency.
2014-02-05 18:12:41 -08:00