Commit Graph

296 Commits

Author SHA1 Message Date
Dave Syer 3496f3f9dc Add marker interface for non-embedded servlet container
ErrorPageFilter is itself an EmbeddedServletContainerFactory
but it runs in a non-embedded container. Any component that assumes
the presence of an EmbeddedServletContainerFactory implies we are
running embedded is therefore invalid. WebSocketAutoConfiguration
had that problem.

Fixes gh-551
2014-03-23 21:45:54 +00:00
Dave Syer 373e2c5156 Allow user to opt out of ContentNegotiatingViewResolver
The bean ID for the ContentNegotiatingViewResolver is now
"viewResolver" (it is the *one*). The conditions have been changed
so that a user only has to define a bean of the same name to switch
it off.

Fixes gh-546
2014-03-22 14:44:30 +00:00
Dave Syer 4637c2a8f7 Accept viewNames and excludedViewNames for ThymeleafViewResolver
(via spring.thymeleaf.*).

Fixes gh-548
2014-03-22 14:25:51 +00:00
Dave Syer e472e7ccca Use forward:/index.html for home page
Fixes gh-549
2014-03-22 14:20:53 +00:00
Phillip Webb 03667c7ddc Rename a few `setup` methods to `configure`
Fixes gh-537
2014-03-21 11:25:31 -07:00
Phillip Webb 3193913899 Polish 2014-03-20 09:08:09 -07:00
Chris Savory 7be2d97d49 Allow multiple MessageSources that are comma separated.
Fixes gh-532, Fixes gh-506
2014-03-20 08:12:11 +00:00
Phillip Webb 798229f530 Document rabbit.addresses property 2014-03-18 11:15:15 -07:00
Dave Syer 01137b6fd6 Add "addresses" to RabbitProperties
If user sets addresses it supercedes anything that was set in host
or port (same as in the native ConnectionFactory).

Fixes gh-524
2014-03-18 17:57:55 +00:00
Piotr Maj 2e74251d1b Add support for sorting json keys
Add `jsonSortKeys` property to HttpMapperProperties.

Fixes gh-498
2014-03-18 10:38:00 -07:00
Phillip Webb c5ee3c7eba Remove duplicate documentation
Remove README files that have been since been migrated to the reference
documentation. Also updated remaining markdown files to asciidoctor to
save having a mix of different formats.

Fixed gh-503
2014-03-16 23:00:12 -07:00
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