Commit Graph

1328 Commits (9758ca55359465673e7b6676bbb71bf10b760851)
 

Author SHA1 Message Date
Dave Syer 9758ca5535 Add some more detail on security config options 11 years ago
Dave Syer 4d608f20e9 Support for AuthenticationManagerBuilder injection into user code
Spring Boot provides a default AuthenticatiomManager for getting
started quickly with security and never exposing insecure
endpoints. To override that feature as users move to the next
stage in their project, they may have to do something slightly
different depending on whether it is a webapp or not.

In any app (web or not), providing a @Bean of type
AuthenticationManager always works, but you don't get the benefit of
the builder features.

In a webapp the user can also extend WebSecurityConfigurerAdapter
to provides a custom AuthenticationManager, and the preferred
way of doing that is via a void method that is autowired with an
AuthenticationManagerBuilder. The default AuthenticationManager is
built in a configurer with @Order(LOWEST_PRECEDENCE - 3) so
to override it the user's confugrer must have higher precedence
(lower @Order).

@EnableGlobalMethodSecurity can also be used in a non-webapp, and
Spring Boot will still provide a default AuthenticationManager.
To override it the user has to either extend
GlobalMethodSecurityConfiguration or provide a @Bean of type
AuthenticationManager (there's no other way to
capture the AuthenticationManagerBuilder that doesn't happen too late
in the beans lifecyle).

Fixes gh-244
11 years ago
Andy Wilkinson 96e10104e4 Add a command to produce a self-contained executable JAR for a CLI app
A new command, jar, has been added to the CLI. The command can be
used to create a self-contained executable JAR file from a CLI app.

Basic usage is:

spring jar <jar-name> <source-files>

For example:

spring jar my-app.jar *.groovy

The resulting jar will contain the classes generated by compiling the
source files, all of the application's dependencies, and entries
on the application's classpath.

By default a CLI application has the current working directory on
its classpath. This can be overridden using the --classpath option.
Any file that is referenced directly by the classpath is always
included in the jar. Any file that is found a result of being
contained within a directory that is on the classpath is subject to
filtering to determine whether or not it should be included. The
default includes are public/**, static/**, resources/**,
META-INF/**, *. The default excludes are .*, repository/**, build/**,
target/**. To be included in the jar, a file must match one of the
includes and none of the excludes. The filters can be overridden using
the --include and --exclude options.

Closes #241
11 years ago
Phillip Webb a99a38966f Switch to Spring Framework 4.0.1.RELEASE 11 years ago
Phillip Webb 5817a01601 Merge pull request #285 from bstick12/master
* pull285:
  Fix TomcatContextCustomizers Assert.notNull checks
11 years ago
bstick12 0fdd7e1843 Fix TomcatContextCustomizers Assert.notNull checks
Correct null assertion checks on setters for TomcatContextCustomizers
and TomcatContextCustomizers
11 years ago
Christian Dupuis be1dc647a5 Beans annotated with @ConfigurationProperties can be their own validators when implementing Spring's Validator interface
fixes #255
11 years ago
Dave Syer bfff4654df Upgrade spring-data-redis to 1.1.1
Fixes gh-258
11 years ago
Dave Syer 216bd16b7a Remove unneeded explicit versions in sample 11 years ago
Christian Dupuis 07238b1ce8 Restructure /configprops output
/configprops output now contains the prefix from @ConfigurationProperties as wells as bean name and actual properties

fixes #267
11 years ago
Christian Dupuis 0ecf7ed2a5 Register @ConfigurationProperties beans with <prefix>.CONFIGURATION_PROPERTIES in case no value or name is specified on the class level annotation 11 years ago
Christian Dupuis 7681d0841f Add missing bean property getters 11 years ago
Christian Dupuis efe8494f46 Remove hard coded bean names for couple of @ConfigurationProperties beans 11 years ago
Dave Syer a26ae0a303 Re-initialize logging if Environment changed settings
Fixes gh-273
11 years ago
Dave Syer 5c6690f704 More detail on reloading static resources 11 years ago
Ben Hale f2951b38d9 Ruby indentation conventions
By convention, Ruby code is indented using two spaces (  ) per-level.
The code used tabs (\t) previously and therefore wasn't idiomatic.
This change updates the indenting to use two spaces.
11 years ago
Ben Hale a3c398ca0a Add --HEAD support to Homebrew formula
This change adds support for --HEAD builds to the Homebrew formula. It
defines a conditional dependency on Maven and builds the -cli project
during install.  The location to install from is abstracted out so
that code is identical regardless of whether the build is --HEAD or
mainline.
11 years ago
Dave Syer 5a7d89c9a9 Look in parent context for Endpoints to expose
Fixes gh-275
11 years ago
Dave Syer 2d54b54d81 Listen for parent close events and close child context
If the context hierarchy is from a SpringApplication we can control
the shutdown semantics a bit. Specifically we need a listener in the child context
that will shut it down when the parent closes (since assummably the child relies
on beans in the arent that may now be disposed).

Fixes gh-275
11 years ago
Dave Syer ea1a8d0dc0 Make SpringApplication list/initializers respect their Ordered 11 years ago
Phillip Webb ef2eb8af6c Fix URL from String creation to work on Windows
Fixed the nested jar URLHandler to correctly deal with files on
Windows.

Fixes gh-269
11 years ago
Phillip Webb 0afdb71345 Better getRootJar exception capturing 11 years ago
Phillip Webb a624245b78 Remove dead code
Remove what appears to be unused CLI code.
11 years ago
Phillip Webb bcd74bb72d Remove custom JodaModule support
Remove the custom JodaModule support which is not necessary with
Spring 4.0.1.

Fixes gh-186
11 years ago
Phillip Webb ac0ff3c0b8 Upgrade to Spring Framework 4.0.1 SNAPSHOT
Upgrade to the latest 4.0.x SNAPSHOT of the Spring Framework in
preparation for the 4.0.1 release.
11 years ago
Phillip Webb 932c3c206b Add LevelRemappingAppender and remap thymeleaf
Add a LevelRemappingAppender that can remap the level of logback events
as they are written.

Also update the base configuration to change the somewhat noisy
Thymeleaf INFO logging to DEBUG.

Fixes gh-265
11 years ago
Phillip Webb b3f5d556bc Allow per context TLD skip patterns
Change TomcatEmbeddedServletContainerFactory to allow per context
skip patterns to be defined, rather than using a global system property.

This commit also renames `skipPatterns` to `tldSkip` to align it with
Tomcat context.xml configuration.

Updates gh-256
11 years ago
Phillip Webb b34102c30c Polish 11 years ago
Dave Syer df93610ff3 Fix JSP sample 11 years ago
Dave Syer 6528062a49 Use custom condition to detect Hibernate 4.2 and 4.3
...without any deprecation warnings and with some chance that it will
still work with Hibernate 5.

Fixes gh-256
11 years ago
Dave Syer 258a1115be Use System properties for skipping Jars for TLD etc. scans
I'd prefer a fix that wasn't global for the VM, but the default values shoudl be harmless
at least.

Fixes gh-274
11 years ago
Dave Syer 1f1820b161 Add Tld scanning exceptions to Tomcat startup
Addresses gh-263 to some extent.
11 years ago
Dave Syer 91998d5942 Add loader.args to PropertiesLauncher
Also new section of README for propery keys used by the
launcher.
11 years ago
Dave Syer 8d05cd1fb6 Allow hibernate.version as synonym in dependency management 11 years ago
Phillip Webb 01550fcec6 Allow `new URL(String)` with nested JARs
Update JarFile to allow the custom registration of a JAR
`URLStreamHandler` that allows `jar:` URLs to be constructed from
Strings. This removes the previous requirement that all nested JAR URLs
be created with a 'context'.

To supported nested JARs the `java.protocol.handler.pkgs` system
property is changed so that our custom URLHandler is picked for 'jar'
protocols in preference to the Java default.

Fixes gh-269
11 years ago
Phillip Webb c1f8fd2bac Fix some compile warnings 11 years ago
Dave Syer 5a47360cb5 Add detection of default config classes to SpringApplicationConfiguration
I guess this didn't get done before because of the legacy structure of the
class hierarchy of TestContextLoaders. It makes sense that we should just prefer
netsted @Configuration though, so that's what this change does.

Fixes gh-271
11 years ago
Phillip Webb 49ef1cd236 Update CLI to use spring-boot-dependency-tools
Update `GroovyCompiler` and `AetherGrapeEngineFactory` to use the
recently added `spring-boot-dependency-tools` in favor of loading
dependency information from a generated properties file.
11 years ago
Phillip Webb ab4baa3c43 Allow gradle builds without version numbers
Add a gradle `ResolutionStrategy` that resolves missing version numbers
using the `spring-boot-dependencies` POM.

This commit also introduces a new `spring-boot-dependency-tools` module
that provides programmatic access to the `dependencyManagement` section
of the dependencies POM.

Fixed gh-262
11 years ago
Dave Syer 19ca4d4eae Add destroyMethods to DataSources 11 years ago
Dave Syer c5584b490a Add some more smarts around --debug
--verbose seems to be only for CLI logging (so really only
for dependency resolution). --debug is interpreted by SpringApplication
but up to now has been extracted and deleted from the command line
by the CommandRunner. This change makes --debug set a System property
*and* pass it down to the application (if used with -- separator).

Fixes gh-266
11 years ago
Dave Syer 607b371706 Add thymeleaf starter
Fixes gh-264
11 years ago
Dave Syer aef7bd60d1 Add layout docs to plugin READMEs 11 years ago
Phillip Webb a77034bff0 Refine ConfigFileApplicationListener a little 11 years ago
Phillip Webb e545e5aa32 Polish 11 years ago
Dave Syer 76b15c4446 Add spring.messages.encoding (default utf-8)
Fixes gh-260
11 years ago
Dave Syer 3a35c95e63 Extend semantics of ConfigFileApplicationListener environment a bit
spring.config.[name,location] can both be a comma-separated list now. Highest
priority is last, like a hash overriding its keys (as per other conventions
in the listener).

Fixes gh-261
11 years ago
Dave Syer dac1b53fda Don't mask original exception in SpringApplication.handleError
If any @Import (or @Enable*, especially @EnableScheduling) has registered
bean *names* as ApplicationListeners, and the application context wasn't
refreshed fully when it failed, then the listener lookup could fail and
mask the original exception

Fixes gh-253
11 years ago
Dave Syer a55809959f Fix type mentioned in javadocs 11 years ago
Dave Syer 195eb9f9bc Updates to redis repositories
* Ensure prefix ends with period
* Allow prefix and key index to be set separately
11 years ago