Fix CLI test failures

pull/10/head
Phillip Webb 11 years ago
parent 4038b39496
commit 77455ec3dc

@ -41,6 +41,30 @@
<version>${project.version}</version> <version>${project.version}</version>
<classifier>tests</classifier> <classifier>tests</classifier>
<scope>test</scope> <scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.javassist</groupId> <groupId>org.javassist</groupId>

@ -40,6 +40,7 @@ import org.codehaus.groovy.control.SourceUnit;
class ExtendedGroovyClassLoader extends GroovyClassLoader { class ExtendedGroovyClassLoader extends GroovyClassLoader {
private Map<String, byte[]> classResources = new HashMap<String, byte[]>(); private Map<String, byte[]> classResources = new HashMap<String, byte[]>();
private CompilerConfiguration configuration; private CompilerConfiguration configuration;
public ExtendedGroovyClassLoader(ClassLoader loader, CompilerConfiguration config) { public ExtendedGroovyClassLoader(ClassLoader loader, CompilerConfiguration config) {

@ -148,7 +148,9 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
this.validator = getOptionalBean(VALIDATOR_BEAN_NAME, Validator.class); this.validator = getOptionalBean(VALIDATOR_BEAN_NAME, Validator.class);
if (this.validator == null if (this.validator == null
&& ClassUtils.isPresent(VALIDATOR_CLASS, this.beanClassLoader)) { && ClassUtils.isPresent(VALIDATOR_CLASS, this.beanClassLoader)) {
LocalValidatorFactoryBean validatorToUse = new LocalValidatorFactoryBean(); LocalValidatorFactoryBean validatorToUse = (LocalValidatorFactoryBean) ClassUtils
.forName(LocalValidatorFactoryBean.class.getName(),
this.beanClassLoader).newInstance();
validatorToUse.setApplicationContext(this.applicationContext); validatorToUse.setApplicationContext(this.applicationContext);
validatorToUse.afterPropertiesSet(); validatorToUse.afterPropertiesSet();
this.validator = validatorToUse; this.validator = validatorToUse;

Loading…
Cancel
Save