diff --git a/build.gradle b/build.gradle index 27c1971..8fcaced 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,14 @@ plugins { // Apply the application plugin to add support for building a CLI application. id 'application' + + id 'org.springframework.boot' version '2.3.4.RELEASE' + id 'io.spring.dependency-management' version '1.0.10.RELEASE' +} + +configurations { + all*.exclude module : 'spring-boot-starter-logging' + //all*.exclude module : 'logback-classic' } repositories { @@ -28,10 +36,12 @@ dependencies { implementation 'com.google.guava:guava:29.0-jre' implementation 'br.com.smartechnology.midas:agent-server:1.2.0' + // https://mvnrepository.com/artifact/org.neo4j.driver/neo4j-java-driver - compile group: 'org.neo4j.driver', name: 'neo4j-java-driver', version: '4.1.1' + implementation 'org.neo4j.driver:neo4j-java-driver:4.1.1' + implementation 'org.springframework.boot:spring-boot-starter-web' // Use JUnit test framework testImplementation 'junit:junit:4.13' @@ -39,5 +49,5 @@ dependencies { application { // Define the main class for the application. - mainClassName = 'sacip.launch.Launcher' + mainClassName = 'sacip.Launcher' } diff --git a/src/main/java/sacip/Launcher.java b/src/main/java/sacip/Launcher.java new file mode 100644 index 0000000..c072eff --- /dev/null +++ b/src/main/java/sacip/Launcher.java @@ -0,0 +1,17 @@ +package sacip; + +import org.midas.as.AgentServer; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Launcher { + public static void main(String[] args) + { + // Inicializando Arquitetura via C�digo + // (não mostra a tela de gerenciamento) + System.out.println("testes"); + AgentServer.initialize(true, true); + SpringApplication.run(Launcher.class, args); + } +} \ No newline at end of file diff --git a/src/main/java/sacip/launch/Launcher.java b/src/main/java/sacip/launch/Launcher.java deleted file mode 100644 index 7a7d644..0000000 --- a/src/main/java/sacip/launch/Launcher.java +++ /dev/null @@ -1,13 +0,0 @@ -package sacip.launch; - -import org.midas.as.AgentServer; - -public class Launcher { - public static void main(String[] args) - { - // Inicializando Arquitetura via C�digo - // (não mostra a tela de gerenciamento) - System.out.println("teste"); - AgentServer.initialize(true, true); - } -} \ No newline at end of file diff --git a/src/main/java/sacip/rest/RestInterface.java b/src/main/java/sacip/rest/RestInterface.java new file mode 100644 index 0000000..7b5da25 --- /dev/null +++ b/src/main/java/sacip/rest/RestInterface.java @@ -0,0 +1,15 @@ +package sacip.rest; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class RestInterface { + + private String test = "HELLO WORLD"; + + @GetMapping("/test") + public String test(String name) { + return test; + } +} diff --git a/src/test/java/sacip/AppTest.java b/src/test/java/sacip/AppTest.java index 5741581..64137c8 100644 --- a/src/test/java/sacip/AppTest.java +++ b/src/test/java/sacip/AppTest.java @@ -5,7 +5,7 @@ import org.junit.Test; -import sacip.launch.Launcher; +import sacip.Launcher; import static org.junit.Assert.*;