From 060b58f276f84a060681d2b5e2f58b0e892035ec Mon Sep 17 00:00:00 2001 From: vitalca Date: Mon, 30 May 2016 14:29:59 -0400 Subject: [PATCH] Refactoring --- build.gradle | 6 ++---- .../eiffel/remrem/generate/EiffelSemanticsController.java | 1 - src/main/java/com/ericsson/eiffel/remrem/generate/App.java | 5 ++++- .../remrem/generate/controller/Eiffel3Controller.java | 4 +++- .../generate/controller/EiffelSemanticsController.java | 4 +++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 492effe1..d22e5382 100644 --- a/build.gradle +++ b/build.gradle @@ -88,7 +88,6 @@ repositories { } dependencies { - compile 'org.slf4j:slf4j-api:1.7.18' compile("org.springframework.boot:spring-boot-starter-web:$sprintBootVersion") { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' } @@ -106,8 +105,8 @@ dependencies { // end::actuator[] //Injectable Message Library and its Implementation - compile 'com.github.Ericsson:eiffel-remrem-shared:0.1.2' - compile 'com.github.Ericsson:eiffel-remrem-semantics:0.1.1' + compile 'com.github.Ericsson:eiffel-remrem-shared:0.1.4' + compile 'com.github.Ericsson:eiffel-remrem-semantics:0.1.2' //compileOnly is supported in gradle 2.12 but it might be required // in cucumber folder @@ -133,7 +132,6 @@ dependencies { // In order to get embedded app container to work integrationTestCompile group: 'com.jayway.restassured', name: 'rest-assured', version: '2.9.0' - integrationTestCompile 'org.slf4j:slf4j-api:1.7.18' // Will be used to package contents of third party libs runtime fileTree(dir: 'libs', include: '*.jar') diff --git a/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java index e5e31e1e..11431995 100644 --- a/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java +++ b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java @@ -2,7 +2,6 @@ import com.google.gson.JsonParser; -import com.ericsson.eiffel.remrem.generate.App; import com.jayway.restassured.RestAssured; import org.apache.http.HttpStatus; diff --git a/src/main/java/com/ericsson/eiffel/remrem/generate/App.java b/src/main/java/com/ericsson/eiffel/remrem/generate/App.java index c783b7f4..248dd3e0 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/generate/App.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/App.java @@ -5,10 +5,13 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.ComponentScan; import java.util.Arrays; -@SpringBootApplication public class App extends SpringBootServletInitializer { +@SpringBootApplication +@ComponentScan("com.ericsson.eiffel.remrem") +public class App extends SpringBootServletInitializer { public static void main(String[] args) { ApplicationContext ctx = SpringApplication.run(App.class, args); diff --git a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java index 22af716f..24bb5c95 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java @@ -1,9 +1,11 @@ package com.ericsson.eiffel.remrem.generate.controller; -import com.ericsson.eiffel.remrem.message.services.MsgService; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + +import com.ericsson.eiffel.remrem.shared.MsgService; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Profile; diff --git a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java index df1ec819..8eda1c22 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java @@ -1,9 +1,11 @@ package com.ericsson.eiffel.remrem.generate.controller; -import com.ericsson.eiffel.remrem.message.services.MsgService; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + +import com.ericsson.eiffel.remrem.shared.MsgService; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.bind.annotation.RequestBody;