Commit 06128cdc28e2d7ee1eea6f9e432c027df3af1d3b
1 parent
9f87bede
SNManage commit
Showing
7 changed files
with
21 additions
and
36 deletions
pom.xml
... | ... | @@ -93,6 +93,19 @@ |
93 | 93 | </includes> |
94 | 94 | </resource> |
95 | 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 | 109 | </build> |
97 | 110 | |
98 | 111 | </project> |
99 | 112 | \ No newline at end of file | ... | ... |
src/main/java/com/example/demo/SNManageApplication.java
src/main/resources/application.properties
... | ... | @@ -15,5 +15,8 @@ spring.thymeleaf.prefix=classpath:/templates/ |
15 | 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 | 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 | 24 | \ No newline at end of file | ... | ... |
src/main/resources/log4j2.xml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <!--monitorInterval:Log4j能够自动检测修改配置 文件和重新配置本身,设置间隔秒数--> |
5 | 5 | <configuration status="WARN" monitorInterval="30"> |
6 | 6 | <Properties> |
7 | - <Property name="baseDir" value="D:/temp/log"/> | |
7 | + <Property name="baseDir" value="./log"/> | |
8 | 8 | </Properties> |
9 | 9 | <!--先定义所有的appender--> |
10 | 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 | -} |