mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 05:55:51 +00:00
test for tomcat
This commit is contained in:
parent
25989ca4ee
commit
945954cb47
2 changed files with 12 additions and 1 deletions
5
pom.xml
5
pom.xml
|
@ -70,6 +70,11 @@
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Databases - Uses HSQL by default -->
|
<!-- Databases - Uses HSQL by default -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -18,6 +18,8 @@ package org.springframework.samples.petclinic;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
|
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PetClinic Spring Boot Application.
|
* PetClinic Spring Boot Application.
|
||||||
|
@ -26,7 +28,11 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class PetClinicApplication {
|
public class PetClinicApplication extends SpringBootServletInitializer {
|
||||||
|
@Override
|
||||||
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||||
|
return application.sources(PetClinicApplication.class);
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
SpringApplication.run(PetClinicApplication.class, args);
|
SpringApplication.run(PetClinicApplication.class, args);
|
||||||
|
|
Loading…
Reference in a new issue