try for modify on tomcat

This commit is contained in:
joe 2017-09-26 18:45:17 -06:00
parent 490661a73b
commit 0a3934037b
2 changed files with 20 additions and 1 deletions

View file

@ -66,6 +66,7 @@
<scope>test</scope>
</dependency>
<!-- Databases - Uses HSQL by default -->
<dependency>
<groupId>org.hsqldb</groupId>
@ -115,6 +116,11 @@
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>

View file

@ -26,10 +26,23 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*
*/
@SpringBootApplication
public class PetClinicApplication {
public class PetClinicApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
public static void main(String[] args) throws Exception {
SpringApplication.run(PetClinicApplication.class, args);
}
}
/**@SpringBootApplication
*public class PetClinicApplication {
*
* public static void main(String[] args) throws Exception {
* SpringApplication.run(PetClinicApplication.class, args);
* }
*
*}
*/