瀏覽代碼

优化test

zhouhao 5 年之前
父節點
當前提交
7efd0c2592

+ 5 - 0
hsweb-starter/pom.xml

@@ -48,6 +48,11 @@
             <artifactId>spring-boot-test-autoconfigure</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-test</artifactId>

+ 2 - 1
hsweb-starter/src/test/java/org/hswebframework/web/starter/initialize/TestApplication.java

@@ -1,7 +1,8 @@
 package org.hswebframework.web.starter.initialize;
 
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 
-@SpringBootApplication
+@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
 public class TestApplication {
 }