Commit Graph

1315 Commits (a26ae0a303d37f29ecd51e095f25f90c933494eb)
 

Author SHA1 Message Date
Dave Syer cf05a5d578 Fix @Conditional for Batch command line runner
Previously it was @ConditionalOnMissingBean(CommandLineRunner.class)
which caued obvious problems when user wanted to add an unrelated
CLR.

Extended feature set so that a JobRegistry can also be used (with
spring.batch.job.name) and the whole idea can be switched off with
spring.boot.job.enabled.
11 years ago
Dave Syer a8c69220c7 Only log startup info (PID etc) for root context
Fixes gh-153
11 years ago
Glenn Renfro 6cf3b91b2e Allow use of underscores in @ConfigurationProperties prefix
Currently the PropertiesConfigurationFilter filters them out.
Thus when deploying to IAAS these environment variables are ignored.

Fixes gh-154
11 years ago
VasylTretiakov 3a37ddb237 Fixed several typos in CONTRIBUTING.md
Fixes gh-158
11 years ago
VasylTretiakov 408e26482f Fixed two typos in README.md
Fixes gh-157
11 years ago
Dave Syer 76ea99ad0b Add instance id suffix to Tomcat Engine name
Fixes gh-160
11 years ago
Dave Syer cf53b76430 Remove another annotation= attribute
Hopefully really fixes gh-151
11 years ago
Dave Syer f2cdb8c69f Change interface of CommandFactory slightly
It's super useful to get a reference to the current SpringCli
instance in the CommandFactory. Potentially implementations can
react to the properties of the Cli, or wrap it into something
more complex.

...supports the likely implementation of the REPL use
case that @jbrisbin has been working on.
11 years ago
Dave Syer e55e8f9863 Add build.gradle samples and rename runJar->bootRun 11 years ago
Janne Valkealahti 4c9c2b8dcf Tweaks for boot gradle plugin
Fixes gh-152.

... to ease excluding dependencies
eckage changed to bootRepackage

- Register BootRepackage order to use task foo(type: BootRepackage){}
- Allow user to use customConfiguration

configurations {
  hadoopruntime.exclude group: 'log4j'
  hadoopruntime.exclude group: 'org.slf4j'
  hadoopruntime.exclude group: 'org.apache.hadoop'
  hadoopruntime.exclude group: 'org.apache.hive'
  hadoopruntime.exclude group: 'commons-logging'
  hadoopruntime.exclude group: 'org.codehaus.jettison'
  hadoopruntime.exclude group: 'com.thoughtworks.xstream'
}
dependencies {
  compile "org.springframework.batch:spring-batch-core:$springBatchVersion"
  compile "org.springframework.batch:spring-batch-infrastructure:$springBatchVersion"
  compile "org.springframework.data:spring-yarn-batch:$springDataVersion"
  compile "org.springframework.data:spring-yarn-boot:$springDataVersion"
  runtime "org.springframework.data:spring-data-hadoop:$springDataVersion"
  runtime "org.springframework.data:spring-data-hadoop-core:$springDataVersion"
  runtime "log4j:log4j:$log4jVersion"
  runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"
  testCompile "org.springframework.data:spring-yarn-test:$springDataVersion"
  testCompile "org.hamcrest:hamcrest-core:$hamcrestVersion"
  testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
  hadoopruntime configurations.runtime
}

springBoot {
  backupSource = true
  customConfiguration = 'hadoopruntime'
}

task appmasterJar(type: Jar) {
  appendix = 'appmaster'
  from sourceSets.main.output
  exclude('**/*Container*')
  exclude('**/*Client*')
}

task clientJar(type: Jar) {
  appendix = 'client'
  from sourceSets.main.output
  exclude('**/*Appmaster*')
  exclude('**/*Container*')
}

task clientBoot(type: BootRepackage, dependsOn: clientJar) {
  withJarTask = clientJar
}

task appmasterBoot(type: BootRepackage, dependsOn: appmasterJar) {
  customConfiguration = "hadoopruntime"
  withJarTask = appmasterJar
}

//jar.enabled = false
//bootRepackage.enabled = false

task bootJars
bootJars.dependsOn = [clientBoot,containerBoot,appmasterBoot]

build.dependsOn(clientBoot)
build.dependsOn(containerBoot)
build.dependsOn(appmasterBoot)
//build.dependsOn(bootJars)
11 years ago
Dave Syer ed8d161d33 Remove debug logging on stderr 11 years ago
Dave Syer 491071d6c0 Upgrade Thymeleaf to 2.1.2
Fixed gh-155
11 years ago
Dave Syer 4f085ace3a Upgrade Batch to 2.2.3 11 years ago
Dave Syer 2543ef7072 Change @Conditional for existing security configuration
Fixed by using `WebSecurityConfiguration` to detect existing
security configuration (not the annotation).

Fixes gh-151
11 years ago
Dave Syer 023faf092f Fix broken test 11 years ago
Dave Syer bcae284dd9 Add a shim Endpoint if management context is child
When management endpoints are on a different port the HandlerMappings
are restricted to a single EndpointHandlerMapping, so the error
controller (which is a normal @Controller with @RequestMappings) does
not get mapped.

Fixed by addinga shim Endpoint on "/error" that delegates to the
ErrorController (which interface picks up an extra method).
11 years ago
Dave Syer 25d9ac6535 Remove FIXME from JPA sample 11 years ago
Dave Syer 4ab77ca893 Added exceptionIfInvalid attribute to @ConfigurationProperties
Default behaviour unchanged, but if you want to ignore validation errors
you can switch them off for indivdual beans now.

Fixes gh-144
11 years ago
Dave Syer f57c8f52bf Check for null before trying to use ApplicationContext
Fixes gh-145
11 years ago
Dave Syer 33c38b3a51 Remove inaccurate TODO 11 years ago
Dave Syer 884fd0125a Add some handler adapter tests 11 years ago
Dave Syer e1a09e0900 Fix formatting of header 11 years ago
Andy Wilkinson b0c5d3254a Make "." be the CLI's default classpath
Previously, the default classpath was empty. Now, in the absence of the
user providing a classpath via the -cp option, the default classpath
will be ".". If the user does specify a classpath, the classpath that's
used will be exactly what they have specified, i.e. "." will no longer
be on the classpath unless specified by the user.

The app sample integration test has been updated to verify that "." is
only the classpath by default.

Fixes #115
11 years ago
Phillip Webb f7f53e4e64 Fix for upstream Spring 4.0 changes 11 years ago
Dave Syer 322b03779d Upgrade Thymeleaf and Spring 11 years ago
Dave Syer f39b044cf7 Fix packaging for Layout.NONE
Fixes gh-139
11 years ago
Ivan Sopov 40bfd295eb minor fix for javadoc 11 years ago
Dave Syer e18a0ea6e4 Include a link to howto.md 11 years ago
Dave Syer 2104d9a1e2 Prevent failure of web app with parent context
ServerProperties formerly had an @OnMissingBeanCondition
that didn't restrict the hierarchy. It also asserts that
the current context (not including parents) contains such
a bean. This led to an inevitable failure when there was
an existing instance in the parent context.

Fixed by a) searching only the current context, b) not
adding a ServerProperties bean if the context is not a
web app.
11 years ago
Dave Syer c03a06b52d Add test for customize container factory 11 years ago
Dave Syer 4a60e3ccf6 Unignore condition tests 11 years ago
Dave Syer a4cb09c4eb Unignore some tests 11 years ago
Dave Syer c16b5d277e Add test for Valve added 11 years ago
Dave Syer 6cfbcafc10 Switch to httpcomponents for better error handling in tests 11 years ago
Christian Dupuis 5661f8fc28 Test key/value sanitization 11 years ago
Christian Dupuis 078933c8fd Add actuator endpoint to expose ConfigurationProperties
This information should probably be also available from the console and log similar to AutoConfigurationReport.
11 years ago
Christian Dupuis 00c8633597 Add missing new exception class 11 years ago
Christian Dupuis 2c67e06b47 Move enablement of endpoints into AbstractEndpoint 11 years ago
Dave Syer f1026b1202 Add JreProxySelector to handle global proxy configuration
The JreProxySelector is used it to adjust the repositories
as they are added to the GrapeEngine. It looks at standard
System proeprties like http.proxyHost and http.proxyPort
and in addition consults standard JRE Authenticator features
for credentials (falling back to System properties
http.proxyUser and http.proxyPassword).

Fixes gh-136
11 years ago
Dave Syer e28e6d9593 More updated howtos 11 years ago
Dave Syer 19fa5b9af6 Updated howtos 11 years ago
Dave Syer d39fc5bb92 Tidy up some tests 11 years ago
Dave Syer 9db55a3b71 Add explicit test for config file and SpringApplication 11 years ago
Dave Syer 131cfd6114 Update @SpringApplicationConfiguration after comment in 3e6c1b 11 years ago
Dave Syer 259e6a6ec1 RedisProperties prefix -> spring.redis 11 years ago
Dave Syer e74da3fa73 FIXME test additions 11 years ago
Dave Syer 3e6c1b435f Add @SpringApplicationConfiguration (for integration testing)
Example:

    @RunWith(SpringJUnit4ClassRunner.class)
    @SpringApplicationConfiguration(classes = SampleDataJpaApplication.class)
    public class CityRepositoryIntegrationTests {

    	@Autowired
    	CityRepository repository;

Fixes gh-66.
11 years ago
Dave Syer 3e5e058b02 Ensure /error view is available 11 years ago
Dave Syer 8c9b7bd406 Use SimpleHealthIndicator if DataSource present 11 years ago
Dave Syer 16222270b8 Improve reporting of SpEL condition matching 11 years ago