Skip to content

Commit

Permalink
🍃 adicionando spring rest basico
Browse files Browse the repository at this point in the history
  • Loading branch information
AdsonEsteves committed Oct 10, 2020
1 parent 0be28c9 commit 8f4112b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 16 deletions.
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -28,16 +36,18 @@ 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'
}

application {
// Define the main class for the application.
mainClassName = 'sacip.launch.Launcher'
mainClassName = 'sacip.Launcher'
}
17 changes: 17 additions & 0 deletions src/main/java/sacip/Launcher.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
13 changes: 0 additions & 13 deletions src/main/java/sacip/launch/Launcher.java

This file was deleted.

15 changes: 15 additions & 0 deletions src/main/java/sacip/rest/RestInterface.java
Original file line number Diff line number Diff line change
@@ -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;
}
}
2 changes: 1 addition & 1 deletion src/test/java/sacip/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import org.junit.Test;

import sacip.launch.Launcher;
import sacip.Launcher;

import static org.junit.Assert.*;

Expand Down

0 comments on commit 8f4112b

Please sign in to comment.