Commit bd8fcb3c authored by 竹天卫's avatar 竹天卫

演示环境 jenkins部署

parent 2ec66b66
...@@ -214,10 +214,22 @@ ...@@ -214,10 +214,22 @@
<properties> <properties>
<env>prod</env> <env>prod</env>
</properties> </properties>
<!-- <activation> <!--<activation>
<activeByDefault>true</activeByDefault>&lt;!&ndash; 默认激活该profile节点&ndash;&gt; <activeByDefault>true</activeByDefault>&lt;!&ndash; 默认激活该profile节点&ndash;&gt;
</activation>--> </activation>-->
</profile> </profile>
<profile>
<!-- 演示环境 -->
<id>show</id>
<properties>
<env>show</env>
</properties>
<!--<activation>
<activeByDefault>true</activeByDefault>&lt;!&ndash; 默认激活该profile节点&ndash;&gt;
</activation>-->
</profile>
</profiles> </profiles>
<build> <build>
...@@ -254,6 +266,7 @@ ...@@ -254,6 +266,7 @@
<excludes> <!--去除多余的文件--> <excludes> <!--去除多余的文件-->
<exclude>application-dev.yml</exclude> <exclude>application-dev.yml</exclude>
<exclude>application-prod.yml</exclude> <exclude>application-prod.yml</exclude>
<exclude>application-show.yml</exclude>
</excludes> </excludes>
</resource> </resource>
<resource> <resource>
......
...@@ -43,12 +43,12 @@ public class WeiXinController { ...@@ -43,12 +43,12 @@ public class WeiXinController {
log.debug("code: {}", code); log.debug("code: {}", code);
log.debug("============================================="); log.debug("=============================================");
try { try {
if(active.equals("prod")){ if(active.equals("dev")){
//正式服务器
return weiXinService.getToken(code, "APP");
}else{
//测试服务器 //测试服务器
return weiXinService.getTestToken(code); return weiXinService.getTestToken(code);
}else{
//正式服务器
return weiXinService.getToken(code, "APP");
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -61,13 +61,12 @@ public class WeiXinController { ...@@ -61,13 +61,12 @@ public class WeiXinController {
@GetMapping("/getPCToken") @GetMapping("/getPCToken")
public BaseResponse getPCToken(String code) { public BaseResponse getPCToken(String code) {
try { try {
if(active.equals("dev")){
if(active.equals("prod")){
//正式服务器
return weiXinService.getToken(code, "PC");
}else{
//测试服务器 //测试服务器
return weiXinService.getTestToken(code); return weiXinService.getTestToken(code);
}else{
//正式服务器
return weiXinService.getToken(code, "PC");
} }
} catch (Exception e) { } catch (Exception e) {
log.debug("获取登录token{}", e); log.debug("获取登录token{}", e);
......
server:
port: 7012
basename: sinoma_bangye
spring:
application: bangye
profiles:
path: /opt/cement/config/bangye/
active: show
datasource:
url: jdbc:mysql://192.168.110.85:3306/${basename}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: admin!@#123
driverClassName: com.mysql.cj.jdbc.Driver
hikari:
minimum-idle: 3
maximum-pool-size: 10
max-lifetime: 30000 #不能小于30秒,否则默认回到1800秒
connection-test-query: SELECT 1
redis:
port: 6379
host: localhost
database: 1
# password: Wise_@123456
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
# 设置swagger用户名密码
swagger:
basic:
enable: false
username: admin
password: admin
mybatis-plus:
# 启动时是否检查MyBatis XML文件是否存在
check-config-location: true
type-aliases-package: cn.wise.sc.cement.business.entity.**
mapper-locations: classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
weixin:
corpId: ww348f91b2573c1867
agentId: 1000004
agentIdPC: 1000005
agentSecret: flISLojPiE1_ieO9bPgyZ4g_4O-Rr-FKzs7e7p3HEtA
agentSecretPC: ABagJNftdn1uOYsDLrhlCIM8jZdcTgEA9DyX6kn_-hY
backUrl: https%3a%2f%2flab.wisenergy.cn%2flab-bangye
backOrcUrl: https://lab.wisenergy.cn/lab-bangye
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=U_R_L&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment