Skip to content

Commit b74d413

Browse files
committed
update readme
1 parent adc9aa4 commit b74d413

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,18 @@
1111

1212
### Usage
1313

14-
代码和配置做了对Tomcat的适配。生成WAR包,放到Tomcat的Webapps目录即可。
1514

16-
生成WAR包命令:
15+
1. 生成war包 `mvn clean package`
16+
2. 将target目录的war包,cp到Tomcat的webapps目录
17+
3. 重启Tomcat应用
18+
1719

1820
```
19-
mvn clean package
21+
http://localhost:8080/java-sec-code-1.0.0/rce/exec?cmd=whoami
2022
```
23+
24+
返回
25+
26+
```
27+
Viarus
28+
```

src/main/java/org/joychou/Application.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
import org.springframework.boot.builder.SpringApplicationBuilder;
66
import org.springframework.boot.web.support.SpringBootServletInitializer;
77

8+
89
@SpringBootApplication
9-
public class Application extends SpringBootServletInitializer{
10+
public class Application extends SpringBootServletInitializer {
1011

1112
@Override
1213
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
1314
return application.sources(Application.class);
1415
}
16+
1517
public static void main(String[] args) throws Exception {
1618
SpringApplication.run(Application.class, args);
1719
}
18-
}
1920

21+
}

0 commit comments

Comments
 (0)