Context Path not found after migrating to Springboot 3 and Spring 6

125 views Asked by At

The following piece worked fine until its migration to Springboot 3.2.0 and Spring6. Ever since migration getting a 404 error i.e context root not found, on calling /health. The app is configured to run on an external server. Any insight would be much appreciated.

@RestController
public class DemoController  {

@Description("Returns app status")
    @GetMapping(value = "/health")
    public ResponseEntity<String> getAppHealth() {
       return ResponseEntity.ok("I'm up");
    }
 }
 
@SpringBootApplication
@ComponentScan(basePackages = "demo.com")
public class SpringbootApplication extends SpringBootServletInitializer {

    private static final Logger LOG = LoggerFactory.getLogger(SpringbootApplication.class);

    public static void main(String[] args) {
        LOG.debug("===============main() called==============");
        SpringApplication.run(SpringbootApplication.class, args);
    }

}
0

There are 0 answers