Initialize Spring Boot docker branch with Drone pipeline
This commit is contained in:
22
src/main/java/cloud/cdchen/backend/BackendApplication.java
Normal file
22
src/main/java/cloud/cdchen/backend/BackendApplication.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package cloud.cdchen.backend;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@SpringBootApplication
|
||||
public class BackendApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BackendApplication.class, args);
|
||||
}
|
||||
|
||||
@RestController
|
||||
static class HealthController {
|
||||
@GetMapping("/")
|
||||
public String index() {
|
||||
return "backend docker branch deployed";
|
||||
}
|
||||
}
|
||||
}
|
||||
6
src/main/resources/application.yml
Normal file
6
src/main/resources/application.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: backend
|
||||
@@ -0,0 +1,12 @@
|
||||
package cloud.cdchen.backend;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class BackendApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user