Trying to use Spring endpoints, but it is not making any sense. I keep getting an error
2024-05-15T11:56:44.452-04:00 DEBUG 14324 --- [test-engine] [nio-8080-exec-5] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to ResourceHttpRequestHandler [classpath [META-INF/resources/], classpath [resources/], classpath [static/], classpath [public/], ServletContext [/]]
2024-05-15T11:56:44.455-04:00 DEBUG 14324 --- [test-engine] [nio-8080-exec-5] o.s.w.s.r.ResourceHttpRequestHandler : Resource not found
2024-05-15T11:56:44.456-04:00 DEBUG 14324 --- [test-engine] [nio-8080-exec-5] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.servlet.resource.NoResourceFoundException: No static resource TestEngine/batch.]
2024-05-15T11:56:44.456-04:00 DEBUG 14324 --- [test-engine] [nio-8080-exec-5] o.s.web.servlet.DispatcherServlet : Completed 404 NOT_FOUND
I feel like I must be missing somethin in the code.
— application.properties —
#Server
server.servlet.context-path=/TestEngine
— Controller —
@RestController
@RequestMapping("/")
public class AppManagementService {
private static STPService _dataService = STPService.Factory.getInstance();
@RequestMapping(method = RequestMethod.GET,
value = "batch",
produces = MediaType.TEXT_XML_VALUE)
public ResponseEntity getFileDetails() {
return ResponseEntity.status(HttpStatus.OK).body("Test");
}
}
— pom/xml —
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
— main —
@SpringBootApplication(scanBasePackages = "controllers")
public class AoeEngineApplication {
public static void main(String[] args) {
SpringApplication.run(TestEngineApplication.class, args);
}
}