setup rest interface
This commit is contained in:
parent
586b5008a5
commit
2bf1bffdf0
20
pom.xml
20
pom.xml
@ -97,6 +97,26 @@
|
|||||||
<artifactId>rabbitmq</artifactId>
|
<artifactId>rabbitmq</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.arcadedb</groupId>
|
||||||
|
<artifactId>arcadedb-gremlin</artifactId>
|
||||||
|
<version>24.6.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.arcadedb</groupId>
|
||||||
|
<artifactId>arcadedb-server</artifactId>
|
||||||
|
<version>24.6.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hashids</groupId>
|
||||||
|
<artifactId>hashids</artifactId>
|
||||||
|
<version>1.0.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -2,12 +2,25 @@ package com.stktrk.app;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@SpringBootApplication
|
// https://stackoverflow.com/questions/51221777/failed-to-configure-a-datasource-url-attribute-is-not-specified-and-no-embedd
|
||||||
public class AppApplication {
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||||
|
@RestController
|
||||||
|
public class AppApplication extends SpringBootServletInitializer {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(AppApplication.class, args);
|
SpringApplication.run(AppApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/hello")
|
||||||
|
public String sayHello(@RequestParam(value = "myName", defaultValue = "World") String name) {
|
||||||
|
return String.format("Hello %s!", name);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
spring.application.name=app
|
spring.application.name=app
|
||||||
|
server.port=9090
|
||||||
Loading…
Reference in New Issue
Block a user