Spring Boot Configration 发表于 2019-04-04 | 分类于 Spring Boot Jetty On Web123456789101112131415<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions></dependency><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jetty</artifactId></dependency> Self4J Conflict12345678910 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> </exclusions></dependency> Unite TestConfigration Application Class12345@RunWith(SpringRunner::class)@SpringBootTest(classes = [NoProducerApplication::class])// or use @ContextConfiguration(classes = [MockApplication::class])spring.main.allow-bean-definition-overriding=true