Commit Graph

58194 Commits

Author SHA1 Message Date
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 13e040c06e Add ErrorWrapperEmbeddedServletContainerFactory for error pages in WARs
Error pages are a feature of the servlet spec but there is no Java API for
registering them in the spec. This filter works around that by accepting error page
registrations from Spring Boot's EmbeddedServletContainerCustomizer (any beans
of that type in the context will be applied to this container).

In addition the ErrorController interface was enhanced to provide callers
the option to suppress logging.

Fixes gh-410
2014-03-03 09:52:40 +00:00
Dave Syer 3f125fb840 Fix typos in JSP docs 2014-02-28 22:30:58 +00:00
Dave Syer e58206bcf6 Add sample web.xml for error mapping 2014-02-28 09:02:31 +00:00
Dave Syer 7b2488dedf Add UTF-8 declarations to starter parent
Fixes gh-411
2014-02-28 08:27:21 +00:00
Dave Syer 38809480fb Add docs for starter pom usage 2014-02-27 14:48:00 +00:00
Dave Syer 6b5828a820 Be defensive if there is no main/classes 2014-02-27 10:55:23 +00:00
Dave Syer 2845b101a1 Add spring-data-rest sample 2014-02-27 10:33:44 +00:00
Marten Deinum 8e8237a93e Spring Data Rest Starter Project
Fixes gh-60
2014-02-27 09:44:12 +00:00
Dave Syer 82f49abeba Expose setter for Map store in InMemoryMetricRepository
User can then use a weak reference map (for instance), if worried
about memory usage.
2014-02-26 17:07:31 +00:00
Dave Syer 29982f5946 Add @Configuration to WebMvcAutoConfigurationAdapter 2014-02-26 17:02:38 +00:00
Sebastien Deleuze e9ead99e9c Make Spring Boot tests locale independent
Fixes gh-405
2014-02-26 16:43:28 +00:00
Dave Syer 42f363dc12 Explicitly manager javassist version
Hibernate is picky about javassist, but unfortunately that
library is used by other parts of our stack (Thymeleaf!?), so
we need a policy for resolving the dependency transitively.
I fixed it to the version in Hibernate 4.3.1 (our current
best foot forward), but it will have to be updateed whenever
Hibernate is.

Fixes gh-402
2014-02-26 14:01:51 +00:00
Dave Syer 70431c5d64 Add howto for Jetty 2014-02-26 09:30:03 +00:00
Dave Syer 89ebe51d76 Tidy up websocket starter
Fixes gh-396
2014-02-26 09:24:49 +00:00
Dave Syer 26ebc98b70 Update SpringApplicationContextLoader for Spring 4.0.3
Spring 4.0.3 is not released yet, but we can anticipate the
change. With this commit SpringApplicationContextLoader can discover
default config (nested) classes if none are provided. It should
just work when Spring is upgraded.

Fixes gh-395
2014-02-25 15:59:38 +00:00
Dave Syer cfba5e8361 Disable default configuration detection in @SpringApplicationConfiguration
This is a holding pattern until SPR-11455 is fixed. We now throw an
exception with a helpful message instead of ttrying to detect default
configuration.

Fixes gh-380
2014-02-25 12:51:36 +00:00
Dave Syer f0f73a4ead Current directory (lodaer.path=.) pathology workaround
It turns out that loader.path=. was pathological and before this
change ended up making the classpath empty (loader.path=.,lib/
would have fixed it). With this change the old behaviour is still
supported, but if the only user-supplied path entry is "." (or
empty) then it is now kept, and translates into the root of the
current archive if running as "java -jar ...".

Fixes gh-270
2014-02-25 12:38:25 +00:00
Phillip Webb 083cb388c0 Upgrade to Spring Security 3.2.1
Fixes gh-392
2014-02-24 21:54:33 -08:00
Phillip Webb 2669d81433 Upgrade 3rd-Party Dependencies
Fixes gh-393
2014-02-24 21:26:39 -08:00
Phillip Webb 0322c5f55d Support EL without jasper by using tomcat-embed-el
Add `tomcat-embed-el` dependency (newly released as part of Tomcat
7.0.52) allowing EL usage without jasper.

Fixes gh-248
2014-02-24 15:00:42 -08:00
Phillip Webb c44f902a7c Upgrade to Tomcat 7.0.52
Fixes gh-245
2014-02-24 14:56:18 -08:00
Phillip Webb 0260297aa4 Polish 2014-02-24 14:31:54 -08:00
Phillip Webb cd3d4b485d Merge pull request #365 from olivergierke/master
* pull365:
  Upgrade to Spring Data Codd GA release.
2014-02-24 14:07:27 -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 865c51d7ac Revert "Omit jar: prefix from jarFileUrl"
Restore previous behavior where JarFile URLs are always prefixed with
"jar:". I believe that the prefix is required in order to remain
compatible with standard JAR URLs.

This reverts commit 825fc2f7df.
2014-02-24 13:44:09 -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 08d8cb8efd Add /mappings endpoint
Lists AbstractUrlMappings and AbstractHandlerMethodMappings
in a loose Map structure. E.g.

{
  "/**/favicon.ico": {
    "bean": "faviconHandlerMapping"
  },
  "/**": {
    "bean": "resourceHandlerMapping"
  },
  "/webjars/**": {
    "bean": "resourceHandlerMapping"
  },
  "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}":
     {
       "bean": "requestMappingHandlerMapping",
       "method": "public java.util.Map<java.lang.String, java.lang.Object> org.springframework.boot.actuate.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)"
...
}

Fixes gh-378
2014-02-24 13:34:07 +00:00
Dave Syer d98bfdea37 Make sure metricsExecutor is shutdown cleanly
The default executor for publishing metrics was a single
thread (native JDK) ExecutorService with a non-daemon thread.
Changed it to a Spring-managed thread pool of size 1, which
is then shutdown with e ApplicationContext automatically.

Fixes gh-388
2014-02-24 11:32:27 +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
Dave Syer 766da91137 Fix shade configuration in parent pom
The Spring resource transformer class name changed
(at least once) since the parent was originally
created.

Fixes gh-384
2014-02-24 08:57:13 +00:00
Dave Syer 511fff05bb Check for a mainClass in "run" task if there is one
If there is a run task with an explicit main it can be used
by the repackage task (assuming its own native setting is
not used).

Fixes gh-389
2014-02-24 08:54:04 +00:00
joschs b7802f98bb Applying RelaxedNames before filtering PropertySources
... to allow for OS_VAR to be bound to a @ConfigurationPropertes("os")
class with field "var".

Fixes gh-387, Fixes gh-391
2014-02-24 07:39:30 +00:00
Dave Syer 1f69ef69cb Add (ignored) test suite for tracking down ordering bugs 2014-02-20 16:55:35 +00:00
Christian Dupuis b2327cb5f9 Fix comment 2014-02-20 17:44:23 +01:00
Dave Syer 56a693198b Fix test (but not gh-380) 2014-02-20 11:50:27 +00:00
Dave Syer 41d80bc031 Fix spring.factories 2014-02-20 10:54:01 +00:00
Dave Syer 23991dd94d Participant -> Listener 2014-02-20 10:29:02 +00:00
Dave Syer 2aa5623116 Disable JMX autoconfig by default in user tests 2014-02-20 10:28:42 +00: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 33db285b6c Fix empty console logs with logback 2014-02-20 08:48:48 +00:00
Dave Syer 0aa3b00fdf Ensure shutdown endpoint is disabled by default
Fixes gh-377
2014-02-20 08:36:18 +00:00
Dave Syer c5d8150fd4 Add docs on initializing a database
Fixes gh-364
2014-02-19 18:06:28 +00:00
Dave Syer e663b44f94 For pre-initialization phase use console only
Added basic-* log configuration files that are loaded in the
beforeInitialization() phase. They don't contain any file
logger so no empty spring.log is ever created.

Fixes gh-303
2014-02-19 17:43:03 +00:00
Dave Syer 825fc2f7df Omit jar: prefix from jarFileUrl 2014-02-19 13:59:05 +00:00