Commit 06128cdc28e2d7ee1eea6f9e432c027df3af1d3b
1 parent
9f87bede
SNManage commit
Showing
7 changed files
with
21 additions
and
36 deletions
pom.xml
@@ -93,6 +93,19 @@ | @@ -93,6 +93,19 @@ | ||
93 | </includes> | 93 | </includes> |
94 | </resource> | 94 | </resource> |
95 | </resources> | 95 | </resources> |
96 | + <plugins> | ||
97 | + <plugin> | ||
98 | + <groupId>org.springframework.boot</groupId> | ||
99 | + <artifactId>spring-boot-maven-plugin</artifactId> | ||
100 | + <executions> | ||
101 | + <execution> | ||
102 | + <goals> | ||
103 | + <goal>repackage</goal> | ||
104 | + </goals> | ||
105 | + </execution> | ||
106 | + </executions> | ||
107 | + </plugin> | ||
108 | + </plugins> | ||
96 | </build> | 109 | </build> |
97 | 110 | ||
98 | </project> | 111 | </project> |
99 | \ No newline at end of file | 112 | \ No newline at end of file |
src/main/java/com/example/demo/SNManageApplication.java
1 | package com.example.demo; | 1 | package com.example.demo; |
2 | 2 | ||
3 | +import org.springframework.boot.CommandLineRunner; | ||
3 | import org.springframework.boot.SpringApplication; | 4 | import org.springframework.boot.SpringApplication; |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication; | 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
5 | import springfox.documentation.swagger2.annotations.EnableSwagger2; | 6 | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
src/main/resources/application.properties
@@ -15,5 +15,8 @@ spring.thymeleaf.prefix=classpath:/templates/ | @@ -15,5 +15,8 @@ spring.thymeleaf.prefix=classpath:/templates/ | ||
15 | spring.thymeleaf.suffix=.html | 15 | spring.thymeleaf.suffix=.html |
16 | 16 | ||
17 | 17 | ||
18 | -SN.file.path=D:/temp/SN.txt | ||
19 | -SN.file.temp.path=D:/temp/SNTemp.txt | ||
20 | \ No newline at end of file | 18 | \ No newline at end of file |
19 | +#SN.file.path=src/main/resources/sn/SN.txt | ||
20 | +#SN.file.temp.path=src/main/resources/sn/SNTemp.txt | ||
21 | + | ||
22 | +SN.file.path= | ||
23 | +SN.file.temp.path= | ||
21 | \ No newline at end of file | 24 | \ No newline at end of file |
src/main/resources/log4j2.xml
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <!--monitorInterval:Log4j能够自动检测修改配置 文件和重新配置本身,设置间隔秒数--> | 4 | <!--monitorInterval:Log4j能够自动检测修改配置 文件和重新配置本身,设置间隔秒数--> |
5 | <configuration status="WARN" monitorInterval="30"> | 5 | <configuration status="WARN" monitorInterval="30"> |
6 | <Properties> | 6 | <Properties> |
7 | - <Property name="baseDir" value="D:/temp/log"/> | 7 | + <Property name="baseDir" value="./log"/> |
8 | </Properties> | 8 | </Properties> |
9 | <!--先定义所有的appender--> | 9 | <!--先定义所有的appender--> |
10 | <appenders> | 10 | <appenders> |
src/main/resources/sn/SN.txt
0 → 100644
No preview for this file type
src/main/resources/sn/SNTemp.txt
0 → 100644
src/test/java/com/example/demo/SNManageApplicationTest.java deleted
1 | -package com.example.demo; | ||
2 | - | ||
3 | -import com.example.demo.service.SNService; | ||
4 | -import org.junit.Test; | ||
5 | -import org.junit.runner.RunWith; | ||
6 | -import org.springframework.beans.factory.annotation.Autowired; | ||
7 | -import org.springframework.beans.factory.annotation.Value; | ||
8 | -import org.springframework.boot.test.context.SpringBootTest; | ||
9 | -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; | ||
10 | -import org.springframework.util.StringUtils; | ||
11 | - | ||
12 | -import java.io.File; | ||
13 | -import java.util.Date; | ||
14 | - | ||
15 | -@RunWith(SpringJUnit4ClassRunner.class) | ||
16 | -@SpringBootTest | ||
17 | -public class SNManageApplicationTest { | ||
18 | - @Autowired | ||
19 | - SNService snService; | ||
20 | - | ||
21 | - @Value("${SN.file.path}") | ||
22 | - String SNFilePath; | ||
23 | - | ||
24 | - @Value("${SN.file.temp.path}") | ||
25 | - String SNTempFilePath; | ||
26 | - | ||
27 | - @Test | ||
28 | - public void test() throws Exception { | ||
29 | - String encryptedSN = "c24x"; | ||
30 | - snService.deleteSN(encryptedSN); | ||
31 | - | ||
32 | - } | ||
33 | -} |