I followed the instructions on https://spring.io/blog/2014/03/07/deploying-spring-boot-applications to deploy a Spring Boot application to a WebSphere Liberty profile.
But, it's not working. When I hit the URL in a browser, I'm getting Context Root Not Found error message.
In the log file, I could actually see the Spring Boot is being started, but it seems to fail to get to the entry point.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.1.RELEASE)
18:01:11.507 [Default Executor-thread-131] INFO us.com.xxx.Application - Starting Application on mylaptop with PID 75199 (/opt/IBM/WebSphere/Liberty/usr/servers/defaultServer/apps/expanded/mywar.war/WEB-INF/classes started by root in /opt/IBM/WebSphere/Liberty/usr/servers/defaultServer)
18:01:11.512 [Default Executor-thread-131] DEBUG us.com.xxx.Application - Running with Spring Boot v1.4.1.RELEASE, Spring v4.3.3.RELEASE
18:01:11.513 [Default Executor-thread-131] INFO us.com.xxx.Application - No active profile set, falling back to default profiles: default
Here's my Application class:
@EnableSwagger2
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
}
My build.gradle to build the war:
apply plugin: "war"
war {
baseName = "mywar"
version = "0.1"
}
apply plugin: "spring-boot"
providedRuntime "org.springframework.boot:spring-boot-starter-tomcat"
Is there anything I missed in my Sprint Boot application? Is there any feature I need to enable in the Liberty server.xml?
