Initialize Spring Boot docker branch with Drone pipeline

This commit is contained in:
2026-06-19 23:46:24 +08:00
commit c57406b4ac
10 changed files with 154 additions and 0 deletions

View 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";
}
}
}

View File

@@ -0,0 +1,6 @@
server:
port: 8080
spring:
application:
name: backend

View File

@@ -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() {
}
}