From b5d512563267b7f6d0dcb7ec1d3bb79ef8d69291 Mon Sep 17 00:00:00 2001
From: Mustapha Zorgati <15628173+mustaphazorgati@users.noreply.github.com>
Date: Thu, 22 Feb 2018 13:58:53 +0100
Subject: [PATCH] TSK-325: minor refactoring
---
lib/taskana-spring-txtest/pom.xml | 4 ----
rest/pom.xml | 4 ----
rest/src/main/java/pro/taskana/rest/RestApplication.java | 5 -----
rest/src/main/resources/application.properties | 5 +++++
rest/src/main/resources/datasource.properties | 5 -----
5 files changed, 5 insertions(+), 18 deletions(-)
delete mode 100644 rest/src/main/resources/datasource.properties
diff --git a/lib/taskana-spring-txtest/pom.xml b/lib/taskana-spring-txtest/pom.xml
index cec4061ed..bb7108b80 100644
--- a/lib/taskana-spring-txtest/pom.xml
+++ b/lib/taskana-spring-txtest/pom.xml
@@ -26,10 +26,6 @@
org.springframework
spring-context
-
- org.springframework
- spring-jdbc
-
org.springframework.boot
spring-boot-starter-jdbc
diff --git a/rest/pom.xml b/rest/pom.xml
index 449238e7b..3ee6046bf 100644
--- a/rest/pom.xml
+++ b/rest/pom.xml
@@ -33,10 +33,6 @@
org.springframework.boot
spring-boot-starter-security
-
- org.springframework
- spring-jdbc
-
org.springframework.boot
spring-boot-starter-jdbc
diff --git a/rest/src/main/java/pro/taskana/rest/RestApplication.java b/rest/src/main/java/pro/taskana/rest/RestApplication.java
index 4c95510df..dea38c640 100644
--- a/rest/src/main/java/pro/taskana/rest/RestApplication.java
+++ b/rest/src/main/java/pro/taskana/rest/RestApplication.java
@@ -14,7 +14,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
-import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.Scope;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.http.converter.json.SpringHandlerInstantiator;
@@ -37,7 +36,6 @@ import pro.taskana.rest.resource.mapper.WorkbasketSummaryMapper;
import pro.taskana.sampledata.SampleDataGenerator;
@SpringBootApplication
-@PropertySource("classpath:datasource.properties")
@EnableTransactionManagement
public class RestApplication {
@@ -58,9 +56,6 @@ public class RestApplication {
@Primary
public DataSource dataSource(DataSourceProperties properties) {
DataSource dataSource = properties.initializeDataSourceBuilder().build();
- // if TaskanaEngineImpl runs with SpringManagedTransactionFactory, then
- // there is no need to wrap the dataSource into TransactionAwareDataSourceProxy ...
- // return new TransactionAwareDataSourceProxy(dataSource);
return dataSource;
}
diff --git a/rest/src/main/resources/application.properties b/rest/src/main/resources/application.properties
index 3171d4f00..330f80780 100644
--- a/rest/src/main/resources/application.properties
+++ b/rest/src/main/resources/application.properties
@@ -1 +1,6 @@
logging.level.pro.taskana=DEBUG
+######## Taskana DB #######
+datasource.url=jdbc:h2:mem:taskana;IGNORECASE=TRUE
+datasource.driverClassName=org.h2.Driver
+datasource.username=sa
+datasource.password=sa
\ No newline at end of file
diff --git a/rest/src/main/resources/datasource.properties b/rest/src/main/resources/datasource.properties
deleted file mode 100644
index 672725003..000000000
--- a/rest/src/main/resources/datasource.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-######## Taskana DB #######
-datasource.url=jdbc:h2:mem:taskana;IGNORECASE=TRUE
-datasource.driverClassName=org.h2.Driver
-datasource.username=sa
-datasource.password=sa
\ No newline at end of file