Fix CLI test failures

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

@ -41,6 +41,30 @@
<version>${project.version}</version>
<classifier>tests</classifier>
<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>
<groupId>org.javassist</groupId>

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

@ -148,7 +148,9 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
this.validator = getOptionalBean(VALIDATOR_BEAN_NAME, Validator.class);
if (this.validator == null
&& 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.afterPropertiesSet();
this.validator = validatorToUse;

Loading…
Cancel
Save