Commit Graph

58380 Commits

Author SHA1 Message Date
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
Dave Syer 4b2cea7267 Add simple DB aware HealthIndicator 2013-10-23 08:33:47 -04:00
Andy Wilkinson 00a0cab781 Remove remaining git.properties files 2013-10-22 17:26:44 +01:00
Andy Wilkinson e5e511fd43 Reinstate use of hasMappingForPattern
Use of hasMappingForPattern was commented out during work on the
Aether-based Grape implementation as it was temporarily removed in 
Spring 4's snapshots. It's since been reinstated in the snapshots, so
its use should have been reinstated prior to merging Aether work into
master.
2013-10-22 17:20:37 +01:00
Andy Wilkinson da748656ba Merge branch 'aether-grab' 2013-10-22 17:13:36 +01:00
Andy Wilkinson c0ae78f3ec Isolate Aether in a separate class loader
Prior to this commit, the Aether-based GrapeEngine was loaded in the
same class loader as the rest of Boot. This led to Aether's and its
dependencies' types polluting the application's class path. Most
notably, this caused problems with logging as the logging framework
could be permaturely initialized.

This commit isolates AetherGrapeEngine, Aether and its dependencies
into a separate class loader. This is done by customizing the
packaging of the CLI's jar file with the internal directory housing
all of the types that will be loaded by the separate class loader.
2013-10-22 17:13:20 +01:00
Andy Wilkinson 39e8e46e2a Provide an Aether-based Grape Engine
Previously, @Grab annotations would use Ivy to download the
dependencies with some of Ivy's known limitations being worked around
by GrapeEngineCustomizer.

This commit adds a GrapeEngine implementation that uses Aether,
the dependency resolution 'engine' used by Maven and Grails. To ensure
consistent behaviour with a Maven build, the Aether-powered dependency
resolution uses the dependency management configuration from the
spring-boot-starter-parent pom file.
2013-10-22 16:06:53 +01:00
Andy Wilkinson a28947f276 Move database files into target directory 2013-10-22 15:58:56 +01:00
Andy Wilkinson b0c6d8060c Remove Git plugin from Spring Boot tools
The Git plugin was primarily being used to provide version information
that Boot's maven plugin can add into the MANIFEST.MF of the uber-jars
that it creates under the Spring-Boot-Commit-Id attribute.

This commit removes the Git plugin from Boot's own projects, but
leaves it in the spring-boot-starter-parent for use by Spring
Boot-based applications.

The attribute in the uber-jars' MANIFEST.MF has been replaced with a
Spring-Boot-Version attribute. The value of this attribute is the
implementation version of Repackager class's package.
2013-10-22 15:54:05 +01:00
Phillip Webb c2c01ce645 Update brew install instructions to use tap
Issue: gh-86
2013-10-18 09:55:52 -07:00
Phillip Webb 6220aba983 Allow 'java -jar' to work with signed nested jars
Fix RandomAccessJarFile to correctly read certificate information as
jar entries are loaded. This change allows signed nested jars to be
used as JCE providers.
2013-10-17 17:19:51 -07:00
Phillip Webb 5c6dd52e9a Polish 2013-10-17 14:12:42 -07:00
Dave Syer 43f8a71af4 Ensure JdbcTemplate and DB initializer still work when user supplies DataSource 2013-10-16 13:43:59 -04:00
Dave Syer f43cf1db61 Stop log4j from moaning on startup 2013-10-16 13:42:51 -04:00
Dave Syer fede0d1c98 Add profiles to /env 2013-10-16 13:42:13 -04:00
Dave Syer 47cd5dd679 Tooling for PropertiesLauncher in JAR archives
To use PropertiesLauncher instead of JarLauncher in an
executable JAR we have provided tooling support. In Maven
(using the starter parent to default some of the settings):

    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <configuration>
        <layout>ZIP</layout>
      </configuration>
    </plugin>

in Gradle:

    apply plugin: "spring-boot"
    springBoot {
        layout = 'ZIP'
      }
    }

[Fixes #58837492] [bs-330] Add tooling for PropertiesLauncher
2013-10-16 08:49:51 -04:00
Dave Syer 837070d6e9 Tidy up log message (add space) 2013-10-15 16:51:58 -04:00
Dave Syer acf458b462 Standardize on spring.datasource.* for database config
[Fixes #58921238] [bs-333] spring.database.* and
spring.datasource.* used to configure database
2013-10-15 16:39:59 -04:00
Dave Syer ea11dafcbd Extend PropertiesLauncher to load nested archives
PropertiesLauncher can now be used to run an executable jar, and by
default it will pick up nested archives in lib/ (where the Boot
tools puts them). User can provide loader.path (colon-separated)
to change the nested path.

[#58837492] [bs-330] Add tooling for PropertiesLauncher
2013-10-15 11:08:45 -04:00
Dave Syer b7ed5bbc76 Revert "Temporary fix for Spring snapshot changes"
This reverts commit 8a804f6185.
2013-10-15 10:16:29 -04:00
Dave Syer d4d9ebcabd Small re-org of PropertiesLauncher 2013-10-15 09:56:52 -04:00
Dave Syer 8a804f6185 Temporary fix for Spring snapshot changes 2013-10-15 09:56:19 -04:00
Dave Syer be1263500d Ensure env vars are consulted for PATH 2013-10-14 16:07:50 -04:00
Dave Syer 281c650251 Add git commit id to MANIFEST in boot tools repackager 2013-10-14 16:06:32 -04:00
Dave Syer b0c54a6588 Add parent class loader entries if possible
...otherwise you can see cryptic NoClassDefFound errors
because the application class was loaded from the parent
on the file system, but then it doesn't have access to the
child loaders nested jars.
2013-10-14 16:02:04 -04:00