diff --git a/pom.xml b/pom.xml index 1289f08..3b43196 100644 --- a/pom.xml +++ b/pom.xml @@ -93,6 +93,19 @@ + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + \ No newline at end of file diff --git a/src/main/java/com/example/demo/SNManageApplication.java b/src/main/java/com/example/demo/SNManageApplication.java index 40e2d6f..211b750 100644 --- a/src/main/java/com/example/demo/SNManageApplication.java +++ b/src/main/java/com/example/demo/SNManageApplication.java @@ -1,5 +1,6 @@ package com.example.demo; +import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import springfox.documentation.swagger2.annotations.EnableSwagger2; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f75ccf0..4ff96a2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -15,5 +15,8 @@ spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.html -SN.file.path=D:/temp/SN.txt -SN.file.temp.path=D:/temp/SNTemp.txt \ No newline at end of file +#SN.file.path=src/main/resources/sn/SN.txt +#SN.file.temp.path=src/main/resources/sn/SNTemp.txt + +SN.file.path= +SN.file.temp.path= \ No newline at end of file diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 78f571f..abe7140 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -4,7 +4,7 @@ - + diff --git a/src/main/resources/sn/SN.txt b/src/main/resources/sn/SN.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/main/resources/sn/SN.txt @@ -0,0 +1 @@ + diff --git a/src/main/resources/sn/SNTemp.txt b/src/main/resources/sn/SNTemp.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/main/resources/sn/SNTemp.txt diff --git a/src/test/java/com/example/demo/SNManageApplicationTest.java b/src/test/java/com/example/demo/SNManageApplicationTest.java deleted file mode 100644 index 547d344..0000000 --- a/src/test/java/com/example/demo/SNManageApplicationTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.example.demo; - -import com.example.demo.service.SNService; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.util.StringUtils; - -import java.io.File; -import java.util.Date; - -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest -public class SNManageApplicationTest { - @Autowired - SNService snService; - - @Value("${SN.file.path}") - String SNFilePath; - - @Value("${SN.file.temp.path}") - String SNTempFilePath; - - @Test - public void test() throws Exception { - String encryptedSN = "c24x"; - snService.deleteSN(encryptedSN); - - } -}