1304 Commits

Author SHA1 Message Date
Dave Syer
39acbb271c Update Thymeleaf versions to latest mutually compatible 2013-11-04 14:44:45 +00:00
Dave Syer
97e6d77711 Do not default username/password for DataSource unless embedded
To use a DataSource pool (Tomcat or DBCP) the user must supply a valid
driver class name *and* database URL. If both are supplied and the
driver class is not one of the embedded ones, then no default username
or password is provided.

Fixes gh-94
2013-11-04 13:35:59 +00:00
Dave Syer
c29d2b1be4 Remove a small race condition 2013-11-04 13:35:59 +00:00
Dave Syer
894940d7aa Add test for dispatcher registration 2013-11-04 13:35:59 +00:00
Andy Wilkinson
b631c113ba Update AetherGrapeEngine to honour --local
When running an application, --local can be used to collect the
application's dependencies in a local directory. Prior to
AetherGrapeEngine being introduced, using --local would result in the
dependencies being written to ./grapes. When AetherGrapeEngine was
introduced --local no longer had any effect.

This commit updates AetherGrapeEngine so that it honours --local,
writing its dependencies to ./repository. When --local is not specified
dependencies are written to ~/.m2/repository (the standard location
for the local Maven cache). As part of this change TestCommand has
been refactored so that it lazily initialises its GroovyCompiler. This
ensures that RunCommand has a chance to set the system property that
backs --local before AetherGrapeEngine is initialised and accesses the
property.

Fixes #99
2013-11-04 11:08:18 +00:00
Andy Wilkinson
e741557a38 Generate springcli.properties before resources are copied
Generate springcli.properties in generate-resources so that it can
be copied by the resources plugin in the process-resources phase.
2013-11-04 11:08:18 +00:00
Dave Syer
f6e6831f25 Correct copy-paste errors in javadocs 2013-11-04 10:39:05 +00:00
Greg Turnquist
cc92ba1a5c Fix spring test to properly handle failures
Failing test cases weren't not properly handled and instead caused
test to break. Added a test case and verified it works for both JUnit
and Spock.
2013-11-04 10:09:48 +00:00
Dave Syer
7e7d4b7d3d Only do Actuator MVC config if in a web app 2013-11-02 16:36:03 +00:00
Dave Syer
78b2f17502 Fix typo in Javadocs 2013-11-02 15:50:09 +00:00
Dave Syer
694725c90b Upgrade to Security RC2 2013-11-02 15:49:53 +00:00
Dave Syer
a2db6a911f Add new sample to reactor build 2013-11-02 15:49:36 +00:00
Dave Syer
bd719c1330 Nest the @EnableWebSecurity so it can be added to a condition 2013-11-01 17:46:37 +00:00
Dave Syer
761c2dabd1 Fix build 2013-11-01 17:07:24 +00:00
Dave Syer
1bd65c7487 Make context hierarchies play nicely with actuator 2013-11-01 16:27:47 +00:00
Dave Syer
f84df423e8 Better implementation of ignores in security config 2013-11-01 15:07:02 +00:00
Dave Syer
c5cfe54c80 Add spring-boot tests to test starter 2013-11-01 14:39:03 +00:00
Dave Syer
217ec5d564 Avoid registering ConfigurationPropertiesBindingPostProcessor twice 2013-11-01 11:57:47 +00:00
Dave Syer
e4d594cce5 Avoid registering endpoints if Spring MVC not available 2013-11-01 11:57:32 +00:00
Dave Syer
3c3825a310 Upgrade Spring to 4.0.0.RC1 2013-11-01 11:29:56 +00:00
Dave Syer
e53dad879d Add sample with form login 2013-11-01 11:28:53 +00:00
Dave Syer
e005ba7232 SpringApplicationBuilder.properties fixes
Previously: properties(Map) behaved differently to
properties(String...).

Fixed by merging the implementations.

Also added properties(Properties).
2013-11-01 08:42:14 +00:00
Dave Syer
63a2d06767 Explicitly disable security on management endpoints if requested
Previously the management endpoint filter was applied to all requests
if the user had disabled security.management.enabled, but since it
had no security applied it was letting all requests through.

The fix was to explicitly exclude the whole enclosing configuration
and carefully ignore the management endpoints in the normal security
chain.

Fixes gh-100.
2013-10-31 18:46:39 +00:00
Dave Syer
5e9b8c3340 Add missing depdendency 2013-10-31 16:49:36 +00:00
Rob Winch
77b5ad1b0b Update to Spring Security Snapshot 2013-10-31 16:45:46 +00:00
Dave Syer
6c31854600 Refactor sample dependencies to use starters 2013-10-31 16:43:57 +00:00
Dave Syer
9f48376cbc Remove unused argument (causes autowiring issues) 2013-10-31 14:52:14 +00:00
Dave Syer
988354bf85 Add missing starter to parent pom 2013-10-31 14:52:14 +00:00
Andy Wilkinson
45c61eb96b Remove special case for integration sample's milestone dependency
3d714d301 allowed all integration tests to download snapshots and
milestones. The test for the integration sample, which depends upon a
milestone, no longer needs to be a special case.
2013-10-31 11:59:03 +00:00
Phillip Webb
a6a1929274 Extract inner-classes from GroovyCompiler
Extract and refactor inner-classes from the GroovyCompiler to improve
code readability.
2013-10-29 00:04:31 -07:00
Dave Syer
8d186945e7 Use RelaxedNames to search for prefix in RelaxedBinder
RelaxedDataBinder now supports "env var" style variables that include the
path prefix, e.g. FOO_BAR_BAZ=boom will bind to a bean with property "baz"
and a binder with prefix "foo.bar".

Fixes gh-98
2013-10-28 17:59:23 -04:00
Phillip Webb
eff587d5b0 Create CliTester JUnit @Rule
Extract logic from SampleIntegrationTests into a reusable JUnit @Rule.
2013-10-28 07:38:07 -07:00
Phillip Webb
a9c9c383f4 Polish pom.xml
Aplly consistent formatting, drop JDK 8 support and cleanup repo
locations to use spring.io.
2013-10-28 07:37:02 -07:00
Phillip Webb
3d714d3016 Allow snapshot repositories in integration tests
Update CLI SampleIntegrationTests to no longer disable snapshot repos.
2013-10-28 05:44:01 -07:00
Andreas Kluth
19b74461e4 Update README.md
- Found typo while reading.
2013-10-25 15:07:48 -04:00
Andy Wilkinson
bde98defa5 Update Gradle plugin to only repackage main jar
Previously, Repackage would attempt to repackage every jar in the
project. This would cause it to incorrectly attempt to repackage source
and javadoc jars.

This commit updates Repackage so that it ignores any jar with a
classifier. Hopefully this is a reasonable approximation for ignoring
'special' jars that should not be repackaged such as sources and
javadoc.
2013-10-25 16:29:59 +01:00
Dave Syer
a4c0733d4a Revert aspectj to default version 2013-10-25 09:54:41 -04:00
Andy Wilkinson
1a76c972e3 Always install new GrapeEngine
Previously, GrapeEngineInstaller would only install its GrapeEngine
if an engine had not already been installed. As the Grape class stores
the engine in a static field, this meant that the engine would only be
installed once for the lifetime of Grape's classloader. This caused
an ordering issue in SampleIntegrationTests.

The test for the integration sample clears the
disableSpringSnapshotRepos system property to allow M1 of the
integration DSL to be resolved. However, this property is only
examined and honoured in AetherGrapeEngine's constructor. If another
test had run and had already created and installed an
AetherGrapeEngine, the new AetherGrapeEngine that allowed the use of
snapshot repositories would not be installed and the test would fail.

This commit updates GrapeEngineInstaller so that it always installs
its GrapeEngine, overwriting any previously installed engine.
2013-10-25 14:33:00 +01:00
Dave Syer
f8d5802230 Fix typo in gradle plugin 2013-10-24 18:04:21 -04:00
Dave Syer
18ee229748 Add support for annotation scan in @ConditionalOn*Bean 2013-10-24 12:39:33 -04:00
Dave Syer
86a369b955 Add renamed Rabbit config to factories 2013-10-24 12:39:33 -04:00
Dave Syer
276f9b784c Add virtual host to Rabbit config 2013-10-24 12:39:33 -04:00
Andy Wilkinson
ecc5463a76 Allow integration sample to download DSL milestone 2013-10-24 16:22:11 +01:00
Andy Wilkinson
4f47f71dc2 Allow use of snapshot repos to be disabled
Previously, the Ivy-based Grape engine used a system property,
disableSpringSnapshotRepos, to control whether or not Spring's
snapshot and milestone repositories were used for dependency
resolution. This commit adds the same capability to AetherGrapeEngine.

[#59489826]
2013-10-24 15:33:39 +01:00
Andy Wilkinson
629a77c3e2 Remove ASM dependency and use Spring Core's instead
Depending on ASM itself can cause problems as it can clash with other
libraries' dependency on it. This commit updates
spring-boot-loader-tools to depend upon spring-core and use its
repackaged copy of ASM instead. Depending on spring-core also brings
with it the advantage of giving access to its various bits of utility
code.

spring-boot-maven-plugin has been updated to remove its ASM
exclusions as they will no longer clash with the version from
spring-boot-loader-tools

(59483608)
2013-10-24 14:38:22 +01:00
Andy Wilkinson
1d5cb7731d Support transitive=false in AetherGrapeEngine
@Grab allows a dependency to be declared, but for its transitive
dependencies to be excluded by setting transitive to false. This
commit enhances AetherGrapeEngine to honour this setting by using a
wildcard exclusion on any dependency so declared.
2013-10-24 13:57:38 +01:00
Dave Syer
97cb7f0967 Ensure ClassLoader is set in BeanFactory 2013-10-23 15:05:12 -04:00
Dave Syer
0498617411 Disable whitelabel view if Thymeleaf error.html detected 2013-10-23 10:48:14 -04:00
Dave Syer
08cf5b4139 Use additional properties instead of default args
SpringApplication (and the builder) now do not accept default
command line args because the override semantics were wrong -
you need to be able to override them with everything, including
system properties and external properties (per profile).

Also implements new semantics for profiles - you can add
additional profiles in the Java API and they will not be
squashed by command line or system properties entries for
spring.profiles.active.

[Fixes #58989906] [bs-336] DefaultArgs -> DefaultProperties
2013-10-23 08:58:07 -04:00
Dave Syer
e789840b3c Adjust db type if postgres 2013-10-23 08:36:31 -04:00