fix: update Dockerfile to run tests during build and adjust TodoController request mapping
This commit is contained in:
@@ -3,7 +3,7 @@ FROM maven:3.9.12-eclipse-temurin-25 AS build
|
||||
WORKDIR /app
|
||||
COPY pom.xml .
|
||||
COPY src ./src
|
||||
RUN mvn clean package -DskipTests
|
||||
RUN mvn clean package
|
||||
|
||||
# Run stage
|
||||
FROM eclipse-temurin:25-jre
|
||||
|
||||
@@ -11,8 +11,7 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/todos")
|
||||
@CrossOrigin(origins = "*")
|
||||
@RequestMapping("/todos")
|
||||
public class TodoController {
|
||||
|
||||
private final TodoService todoService;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
server.servlet.context-path=/api
|
||||
spring.application.name=backend
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/tododb
|
||||
spring.datasource.username=postgres
|
||||
|
||||
Reference in New Issue
Block a user