Skip to content

Commit 859a35a

Browse files
committed
feat:将vue.js打包到jar包内
1 parent e15ee7d commit 859a35a

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ target/
44
!.mvn/wrapper/maven-wrapper.jar
55
!**/src/main/**/target/
66
!**/src/test/**/target/
7+
/static
78

89
### STS ###
910
.apt_generated

gen/src/main/resources/application.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ mybatis.configuration.map-underscore-to-camel-case=true
2727
gen.format-xml=false
2828

2929
logging.file.path=log
30+
31+
#spring.resources.static-locations=classpath:/static/

readme.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ Mac/Linux系统可直接执行`build.sh`进行构建,构建结果在`dist/gen`
8989
- 执行`java -jar gen-xx-SNAPSHOT.jar`
9090
- 浏览器访问`http://localhost:6969/`
9191

92+
- 将vue.js打包到jar包内:
93+
- `cd front & npm run build:prod`
94+
- 复制`dist/gen/view`内所有内容到`gen`项目的`resources/static`
95+
- 注释`GeneratorConfig#addResourceHandlers`方法体中的内容
96+
- 执行`mvn clean package`,在`gen/target`下会生成一个`gen-1.0.0-SNAPSHOT.jar`(xx表示本号)
97+
- 执行`java -jar gen-xx-SNAPSHOT.jar`
98+
- 浏览器访问`http://localhost:6969/`
99+
92100
## 常用模板
93101
下载template中的模板,通过页面的批量导入模板功能导入即可使用。
94102

0 commit comments

Comments
 (0)