Skip to content

Commit

Permalink
简化调试和部署
Browse files Browse the repository at this point in the history
  • Loading branch information
lsgwr authored and gitee-org committed May 19, 2021
1 parent d753c9d commit a54d446
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
6 changes: 1 addition & 5 deletions backend/exam/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ spring:
datasource:
username: root
password: tooldev
url: jdbc:mysql://127.0.0.1:3306/exam?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai

server:
servlet:
context-path: /api
url: jdbc:mysql://127.0.0.1:3306/exam?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
4 changes: 0 additions & 4 deletions backend/exam/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ spring:
username: root
password: aA111111
url: jdbc:mysql://localhost:3306/exam?characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai

server:
servlet:
context-path: # 这里配置为空是因为生产环境法需要自己配置nginx的转发,nginx可以参考我的配置doc/deploy/nginx.conf
3 changes: 2 additions & 1 deletion backend/exam/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ user:

server:
port: 9527 # 这个端口要和vue项目里vue.config.js里的devServer里面配置的相同

servlet:
context-path: /api
spring:
application:
name: service-exam
Expand Down
2 changes: 1 addition & 1 deletion doc/deploy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 后端服务地址
proxy_pass http://localhost:9527/;
proxy_pass http://localhost:9527/api/;
}


Expand Down

0 comments on commit a54d446

Please sign in to comment.