Upgrade to Boot 1.4.1
- Align related spring train deps - Modify some other deps to get correct versions - Some testing changes as boot 1.4.1 shuffled some test stuff around. - Fixed deprecations with newer boot and framework - Fixes #256
This commit is contained in:
@@ -7,7 +7,7 @@ buildscript {
|
||||
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
|
||||
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.2')
|
||||
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
||||
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.1.RELEASE")
|
||||
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,11 @@ configure(sampleProjects()) {
|
||||
dependencies {
|
||||
compile project(":spring-statemachine-core")
|
||||
compile "org.springframework:spring-context-support:$springVersion"
|
||||
testCompile("org.mockito:mockito-core:$mockitoVersion") { dep ->
|
||||
exclude group: "org.hamcrest"
|
||||
}
|
||||
testCompile project(":spring-statemachine-test")
|
||||
testCompile "org.springframework.boot:spring-boot-test:$springBootVersion"
|
||||
testCompile "org.springframework:spring-test:$springVersion"
|
||||
testCompile "org.hamcrest:hamcrest-core:$hamcrestVersion"
|
||||
testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
springShellVersion=1.1.0.RELEASE
|
||||
springSecurityVersion=4.0.3.RELEASE
|
||||
springDataRedisVersion=1.6.2.RELEASE
|
||||
springDataCommonsVersion=1.11.2.RELEASE
|
||||
springDataJpaVersion=1.9.2.RELEASE
|
||||
springDataRedisVersion=1.7.3.RELEASE
|
||||
springDataCommonsVersion=1.12.3.RELEASE
|
||||
springDataJpaVersion=1.10.3.RELEASE
|
||||
springCloudClusterVersion=1.0.0.RELEASE
|
||||
jedisVersion=2.7.3
|
||||
junitVersion=4.12
|
||||
springVersion=4.2.4.RELEASE
|
||||
springVersion=4.3.3.RELEASE
|
||||
kryoVersion=3.0.3
|
||||
log4jVersion=1.2.17
|
||||
springBootVersion=1.3.1.RELEASE
|
||||
springBootVersion=1.4.1.RELEASE
|
||||
version=1.2.0.BUILD-SNAPSHOT
|
||||
mockitoVersion = 1.9.5
|
||||
hamcrestVersion=1.3
|
||||
|
||||
@@ -85,7 +85,7 @@ public class StateMachineConfiguration<S, E> extends
|
||||
AnnotationAttributes scopeAttributes = AnnotationAttributes.fromMap(importingClassMetadata.getAnnotationAttributes(
|
||||
Scope.class.getName(), false));
|
||||
if (scopeAttributes != null) {
|
||||
String scope = scopeAttributes.getAliasedString("value", Scope.class, enableStateMachineEnclosingClass);
|
||||
String scope = scopeAttributes.getString("value");
|
||||
if (StringUtils.hasText(scope)) {
|
||||
beanDefinitionBuilder.setScope(scope);
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ public class StateMachineMethodInvokerHelper<T, S, E> extends AbstractExpression
|
||||
} else if (annotationType.equals(ExtendedStateVariable.class)) {
|
||||
AnnotationAttributes annotationAttributes = AnnotationAttributes
|
||||
.fromMap(AnnotationUtils.getAnnotationAttributes(mappingAnnotation));
|
||||
String key = annotationAttributes.getAliasedString("value", ExtendedStateVariable.class, null);
|
||||
String key = annotationAttributes.getString("value");
|
||||
sb.append("variables.get('" + key + "')");
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ project('spring-statemachine-data-jpa') {
|
||||
description = "Spring State Machine Data Jpa"
|
||||
dependencies {
|
||||
compile project(":spring-statemachine-data-common")
|
||||
compile "org.springframework:spring-orm:$springVersion"
|
||||
optional "org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion"
|
||||
testCompile "org.hsqldb:hsqldb:$hsqlVersion"
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
|
||||
|
||||
@@ -17,7 +17,7 @@ package demo.datajpa;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.orm.jpa.EntityScan;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
|
||||
//tag::snippetA[]
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.annotation.DirtiesContext.ClassMode;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -34,7 +34,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = { Application.class})
|
||||
@SpringBootTest(classes = { Application.class})
|
||||
@WebAppConfiguration
|
||||
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
|
||||
public class DeployTests {
|
||||
|
||||
@@ -18,7 +18,7 @@ package demo.deploy;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.statemachine.StateMachine;
|
||||
@@ -29,7 +29,7 @@ import org.springframework.test.annotation.DirtiesContext.ClassMode;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = { StateMachineConfig.class})
|
||||
@SpringBootTest(classes = { StateMachineConfig.class})
|
||||
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
|
||||
public class StateMachineTests {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.MediaType;
|
||||
@@ -46,7 +46,7 @@ import demo.eventservice.StateMachineConfig.Events;
|
||||
import demo.eventservice.StateMachineConfig.States;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = { Application.class, Config.class })
|
||||
@SpringBootTest(classes = { Application.class, Config.class })
|
||||
@WebAppConfiguration
|
||||
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
|
||||
public class EventServiceTests {
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.annotation.DirtiesContext.ClassMode;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -34,7 +34,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = { Application.class})
|
||||
@SpringBootTest(classes = { Application.class})
|
||||
@WebAppConfiguration
|
||||
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
|
||||
public class OrdershippingTests {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.statemachine.StateMachine;
|
||||
import org.springframework.statemachine.config.StateMachineFactory;
|
||||
@@ -30,7 +30,7 @@ import org.springframework.test.annotation.DirtiesContext.ClassMode;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = { StateMachineConfig.class})
|
||||
@SpringBootTest(classes = { StateMachineConfig.class})
|
||||
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
|
||||
public class StateMachineTests {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.statemachine.StateMachine;
|
||||
import org.springframework.statemachine.listener.StateMachineListenerAdapter;
|
||||
import org.springframework.statemachine.state.State;
|
||||
@@ -41,7 +41,7 @@ import demo.CommonConfiguration;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
|
||||
@SpringApplicationConfiguration(classes = { CommonConfiguration.class, Application.class, StateMachineCommands.class })
|
||||
@SpringBootTest(classes = { CommonConfiguration.class, Application.class, StateMachineCommands.class })
|
||||
public class PersistTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user