Commit 9eac2ec1 authored by tangwei's avatar tangwei

自动登录机器人

parent d452ff3d
......@@ -51,21 +51,21 @@
<artifactId>geodesy</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-authtoken</artifactId>
<version>1.7.13-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.yeejoin</groupId>-->
<!-- <artifactId>amos-component-authtoken</artifactId>-->
<!-- <version>1.7.13-SNAPSHOT</version>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.typroject</groupId>-->
<!-- <artifactId>*</artifactId>-->
<!-- </exclusion>-->
<!-- <exclusion>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>*</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
</dependencies>
</project>
......@@ -47,17 +47,28 @@ import com.yeejoin.equipmanage.common.vo.Token;
@Service("remoteSecurityService")
public class RemoteSecurityService {
@Autowired
AmosRequestContext amosRequestContext;
@Value("${amos.system.user.password}")
private String password;
// @Value("${security.password}")
// private String password;
// @Value("${security.loginId}")
// private String loginId;
//
// @Value("${security.productWeb}")
// private String productWeb;
//
@Value("${security.productApp}")
private String productApp;
@Value("${amos.system.user.app-key}")
private String appKeyApp;
@Value("${amos.system.user.user-name}")
private String userName;
@Value("${amos.system.user.app-key}")
private String appKey;
@Value("${amos.system.user.product}")
private String product;
@Autowired
private RedisTemplate<String, String> redisTemplate;
......@@ -67,6 +78,9 @@ public class RemoteSecurityService {
@Autowired
private HttpServletRequest request;
@Autowired
AmosRequestContext amosRequestContext ;
// * 根据公司id查询机构用户
public List<AgencyUserModel> listUserByCompanyId(String companyId) {
......@@ -407,23 +421,28 @@ public class RemoteSecurityService {
// }
public Token getServerToken() {
IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
dPasswordAuthModel.setLoginId(amosRequestContext.getUserName());
dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
Token toke = null;
try {
toke = JSON.parseObject(this.redisTemplate.opsForValue().get(buildKey(amosRequestContext.getUserName())), Token.class);
if (ObjectUtils.isEmpty(toke)) {
toke = getLogin(dPasswordAuthModel);
} else {
RequestContext.setProduct(amosRequestContext.getProduct());
if (!redisUtils.refresh(toke.getToke())) {
toke = getLogin(dPasswordAuthModel);
}
}
} catch (InnerInvokException e) {
e.printStackTrace();
}
// IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
// dPasswordAuthModel.setLoginId(loginId);
// dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
// Token toke = null;
// try {
// toke = JSON.parseObject(this.redisTemplate.opsForValue().get(buildKey(loginId)), Token.class);
// if (ObjectUtils.isEmpty(toke)) {
// toke = getLogin(dPasswordAuthModel);
// } else {
// RequestContext.setProduct(productWeb);
// if (!redisUtils.refresh(toke.getToke())) {
// toke = getLogin(dPasswordAuthModel);
// }
// }
// } catch (InnerInvokException e) {
// e.printStackTrace();
// }
Token toke=new Token();
toke.setAppKey(appKeyApp);
toke.setProduct(product);
toke.setToke(amosRequestContext.getToken());
redisTemplate.opsForValue().set(buildKey(userName), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
return toke;
}
......@@ -432,13 +451,17 @@ public class RemoteSecurityService {
return "system_" + username;
}
private Token getLogin(IdPasswordAuthModel dPasswordAuthModel) {
Token toke = new Token();
RequestContext.setProduct(amosRequestContext.getProduct());
toke.setToke(amosRequestContext.getToken());
toke.setProduct(amosRequestContext.getProduct());
toke.setAppKey(amosRequestContext.getAppKey());
redisTemplate.opsForValue().set(buildKey(dPasswordAuthModel.getLoginId()), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
return toke;
}
// private Token getLogin(IdPasswordAuthModel dPasswordAuthModel) {
// Token toke = new Token();
// RequestContext.setProduct(productWeb);
// FeignClientResult feignClientResult = Privilege.authClient.idpassword(dPasswordAuthModel);
// Map map = (Map) feignClientResult.getResult();
// if (map != null) {
// toke.setToke(map.get("token").toString());
// toke.setProduct(productWeb);
// toke.setAppKey(appKeyApp);
// redisTemplate.opsForValue().set(buildKey(dPasswordAuthModel.getLoginId()), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
// }
// return toke;
// }
}
......@@ -64,10 +64,10 @@ public class LoginController {
@Value("${outSystem.user.password}")
private String password;
@Value("${security.productWeb}")
@Value("${amos.system.user.product}")
private String product;
@Value("${security.appKey}")
@Value("${amos.system.user.app-key}")
private String appKey;
@ApiOperation(value = "通过userId登录", notes = "查询设备指标")
......
......@@ -10,6 +10,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import com.yeejoin.amos.component.authtoken.robot.AmosRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -44,17 +45,35 @@ import com.yeejoin.amos.latentdanger.common.remote.IAMOSSecurityServer;
@Service("remoteSecurityService-danger")
public class RemoteSecurityService {
@Value("${security.password}")
private String password;
@Value("${security.loginId}")
private String loginId;
@Value("${security.productWeb}")
private String productWeb;
@Value("${security.appKey}")
private String appKey;
// @Value("${security.password}")
// private String password;
// @Value("${security.loginId}")
// private String loginId;
// @Value("${security.productWeb}")
// private String productWeb;
// @Value("${security.appKey}")
// private String appKey;
// @Value("${security.productApp}")
// private String productApp;
@Value("${security.productApp}")
private String productApp;
@Value("${amos.system.user.user-name}")
private String userName;
@Value("${amos.system.user.app-key}")
private String appKey;
@Value("${amos.system.user.product}")
private String product;
@Autowired
AmosRequestContext amosRequestContext ;
private static final Logger log = LoggerFactory.getLogger(RemoteSecurityService.class);
@Autowired
......@@ -101,34 +120,39 @@ public class RemoteSecurityService {
}
public Toke getServerToken() {
IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
dPasswordAuthModel.setLoginId(loginId);
dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
Toke toke = null;
try {
toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
if (ObjectUtils.isEmpty(toke)) {
toke = getLogin(dPasswordAuthModel);
} else {
RequestContext.setProduct(productWeb);
if (!TokenOperation.refresh(toke.getToke())) {
toke = getLogin(dPasswordAuthModel);
}
}
} catch (InnerInvokException e) {
e.printStackTrace();
}
// IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
// dPasswordAuthModel.setLoginId(loginId);
// dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
// Toke toke = null;
// try {
// toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
// if (ObjectUtils.isEmpty(toke)) {
// toke = getLogin(dPasswordAuthModel);
// } else {
// RequestContext.setProduct(productWeb);
// if (!TokenOperation.refresh(toke.getToke())) {
// toke = getLogin(dPasswordAuthModel);
// }
// }
// } catch (InnerInvokException e) {
// e.printStackTrace();
// }
Toke toke=new Toke();
toke.setProduct(product);
toke.setAppKey(appKey);
toke.setToke(amosRequestContext.getToken());
redisTemplate.opsForValue().set(buildKey(userName), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
return toke;
}
private Toke getLogin(IdPasswordAuthModel dPasswordAuthModel) {
Toke toke = new Toke();
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
FeignClientResult feignClientResult = Privilege.authClient.idpassword(dPasswordAuthModel);
Map map = (Map) feignClientResult.getResult();
if (map != null) {
toke.setToke(map.get("token").toString());
toke.setProduct(productWeb);
toke.setProduct(product);
toke.setAppKey(appKey);
redisTemplate.opsForValue().set(buildKey(dPasswordAuthModel.getLoginId()), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
}
......@@ -558,6 +582,7 @@ public class RemoteSecurityService {
return null;
}
public boolean loginOutFromApp(String toke, String product, String appKey) {
RequestContext.setToken(toke);
RequestContext.setProduct(product);
......@@ -628,7 +653,7 @@ public class RemoteSecurityService {
public AgencyUserModel getAgencyUserModel(String token) {
RequestContext.setToken(token);
RequestContext.setAppKey(appKey);
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
try {
AgencyUserModel result = Privilege.agencyUserClient.getme().getResult();
return result;
......
......@@ -11,6 +11,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import com.yeejoin.amos.component.authtoken.robot.AmosRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -45,17 +46,35 @@ import com.yeejoin.amos.maintenance.common.remote.IAMOSSecurityServer;
@Service("remoteSecurityService")
public class RemoteSecurityService {
@Value("${security.password}")
private String password;
@Value("${security.loginId}")
private String loginId;
@Value("${security.productWeb}")
private String productWeb;
@Value("${security.appKey}")
private String appKey;
// @Value("${security.password}")
// private String password;
// @Value("${security.loginId}")
// private String loginId;
// @Value("${security.productWeb}")
// private String productWeb;
// @Value("${security.appKey}")
// private String appKey;
// @Value("${security.productApp}")
// private String productApp;
@Value("${security.productApp}")
private String productApp;
@Value("${amos.system.user.user-name}")
private String userName;
@Value("${amos.system.user.app-key}")
private String appKey;
@Value("${amos.system.user.product}")
private String product;
@Autowired
AmosRequestContext amosRequestContext ;
private static final Logger log = LoggerFactory.getLogger(RemoteSecurityService.class);
@Autowired
......@@ -102,34 +121,39 @@ public class RemoteSecurityService {
}
public Toke getServerToken() {
IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
dPasswordAuthModel.setLoginId(loginId);
dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
Toke toke = null;
try {
toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
if (ObjectUtils.isEmpty(toke)) {
toke = getLogin(dPasswordAuthModel);
} else {
RequestContext.setProduct(productWeb);
if (!TokenOperation.refresh(toke.getToke())) {
toke = getLogin(dPasswordAuthModel);
}
}
} catch (InnerInvokException e) {
e.printStackTrace();
}
// IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
// dPasswordAuthModel.setLoginId(loginId);
// dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
// Toke toke = null;
// try {
// toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
// if (ObjectUtils.isEmpty(toke)) {
// toke = getLogin(dPasswordAuthModel);
// } else {
// RequestContext.setProduct(product);
// if (!TokenOperation.refresh(toke.getToke())) {
// toke = getLogin(dPasswordAuthModel);
// }
// }
// } catch (InnerInvokException e) {
// e.printStackTrace();
// }
Toke toke=new Toke();
toke.setProduct(product);
toke.setAppKey(appKey);
toke.setToke(amosRequestContext.getToken());
redisTemplate.opsForValue().set(buildKey(userName), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
return toke;
}
private Toke getLogin(IdPasswordAuthModel dPasswordAuthModel) {
Toke toke = new Toke();
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
FeignClientResult feignClientResult = Privilege.authClient.idpassword(dPasswordAuthModel);
Map map = (Map) feignClientResult.getResult();
if (map != null) {
toke.setToke(map.get("token").toString());
toke.setProduct(productWeb);
toke.setProduct(product);
toke.setAppKey(appKey);
redisTemplate.opsForValue().set(buildKey(dPasswordAuthModel.getLoginId()), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
}
......@@ -637,7 +661,7 @@ public class RemoteSecurityService {
public AgencyUserModel getAgencyUserModel(String token) {
RequestContext.setToken(token);
RequestContext.setAppKey(appKey);
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
try {
AgencyUserModel result = Privilege.agencyUserClient.getme().getResult();
return result;
......
......@@ -11,6 +11,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import com.yeejoin.amos.component.authtoken.robot.AmosRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -45,17 +46,38 @@ import com.yeejoin.amos.patrol.common.remote.IAMOSSecurityServer;
@Service("remoteSecurityService")
public class RemoteSecurityService {
@Value("${security.password}")
private String password;
@Value("${security.loginId}")
private String loginId;
@Value("${security.productWeb}")
private String productWeb;
@Value("${security.appKey}")
private String appKey;
// @Value("${security.password}")
// private String password;
// @Value("${security.loginId}")
// private String loginId;
// @Value("${security.productWeb}")
// private String productWeb;
// @Value("${security.appKey}")
// private String appKey;
// @Value("${security.productApp}")
// private String productApp;
@Value("${security.productApp}")
private String productApp;
@Value("${amos.system.user.user-name}")
private String userName;
@Value("${amos.system.user.app-key}")
private String appKey;
@Value("${amos.system.user.product}")
private String product;
@Autowired
AmosRequestContext amosRequestContext ;
private static final Logger log = LoggerFactory.getLogger(RemoteSecurityService.class);
@Autowired
......@@ -102,36 +124,44 @@ public class RemoteSecurityService {
}
public Toke getServerToken() {
IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
dPasswordAuthModel.setLoginId(loginId);
dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
Toke toke = null;
try {
toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
if (ObjectUtils.isEmpty(toke)) {
toke = getLogin(dPasswordAuthModel);
} else {
RequestContext.setProduct(productWeb);
if (!TokenOperation.refresh(toke.getToke())) {
toke = getLogin(dPasswordAuthModel);
}
}
RequestContext.setAppKey(toke.getAppKey());
RequestContext.setToken(toke.getToke());
} catch (InnerInvokException e) {
e.printStackTrace();
}
// IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
// dPasswordAuthModel.setLoginId(loginId);
// dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
// Toke toke = null;
// try {
// toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
// if (ObjectUtils.isEmpty(toke)) {
// toke = getLogin(dPasswordAuthModel);
// } else {
// RequestContext.setProduct(productWeb);
// if (!TokenOperation.refresh(toke.getToke())) {
// toke = getLogin(dPasswordAuthModel);
// }
// }
// RequestContext.setAppKey(toke.getAppKey());
// RequestContext.setToken(toke.getToke());
// } catch (InnerInvokException e) {
// e.printStackTrace();
// }
// return toke;
Toke toke=new Toke();
toke.setProduct(product);
toke.setAppKey(appKey);
toke.setToke(amosRequestContext.getToken());
redisTemplate.opsForValue().set(buildKey(userName), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
return toke;
}
private Toke getLogin(IdPasswordAuthModel dPasswordAuthModel) {
Toke toke = new Toke();
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
FeignClientResult feignClientResult = Privilege.authClient.idpassword(dPasswordAuthModel);
Map map = (Map) feignClientResult.getResult();
if (map != null) {
toke.setToke(map.get("token").toString());
toke.setProduct(productWeb);
toke.setProduct(product);
toke.setAppKey(appKey);
redisTemplate.opsForValue().set(buildKey(dPasswordAuthModel.getLoginId()), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
}
......@@ -631,7 +661,7 @@ public class RemoteSecurityService {
public AgencyUserModel getAgencyUserModel(String token) {
RequestContext.setToken(token);
RequestContext.setAppKey(appKey);
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
try {
AgencyUserModel result = Privilege.agencyUserClient.getme().getResult();
return result;
......
......@@ -87,7 +87,7 @@ public class UserController extends AbstractBaseController {
private String SecurityName;
@Value("${security.productApp}")
private String productApp;
@Value("${security.appKey}")
@Value("${amos.system.user.app-key}")
private String appKey;
@Autowired
private RestTemplate restTemplate;
......
......@@ -11,6 +11,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import com.yeejoin.amos.component.authtoken.robot.AmosRequestContext;
import com.yeejoin.amos.feign.systemctl.model.MessageModel;
import com.yeejoin.amos.supervision.business.feign.JCSFeignClient;
import com.yeejoin.amos.supervision.common.remote.IAMOSSecurityServer;
......@@ -48,17 +49,33 @@ import org.typroject.tyboot.core.foundation.context.RequestContextModel;
@Service("remoteSecurityService")
public class RemoteSecurityService {
@Value("${security.password}")
private String password;
@Value("${security.loginId}")
private String loginId;
@Value("${security.productWeb}")
private String productWeb;
@Value("${security.appKey}")
private String appKey;
// @Value("${security.password}")
// private String password;
// @Value("${security.loginId}")
// private String loginId;
// @Value("${security.productWeb}")
// private String productWeb;
// @Value("${security.appKey}")
// private String appKey;
// @Value("${security.productApp}")
// private String productApp;
@Value("${security.productApp}")
private String productApp;
@Value("${amos.system.user.user-name}")
private String userName;
@Value("${amos.system.user.app-key}")
private String appKey;
@Value("${amos.system.user.product}")
private String product;
private static final Logger log = LoggerFactory.getLogger(RemoteSecurityService.class);
@Autowired
......@@ -70,6 +87,9 @@ public class RemoteSecurityService {
@Autowired
private JCSFeignClient jcsFeignClient;
@Autowired
AmosRequestContext amosRequestContext ;
//根据公司名称获取公司人
public List<CompanyModel> listCompanyTree(String toke, String product, String appKey, String companyName) {
RequestContext.setToken(toke);
......@@ -107,34 +127,39 @@ public class RemoteSecurityService {
}
public Toke getServerToken() {
IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
dPasswordAuthModel.setLoginId(loginId);
dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
Toke toke = null;
try {
toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
if (ObjectUtils.isEmpty(toke)) {
toke = getLogin(dPasswordAuthModel);
} else {
RequestContext.setProduct(productWeb);
if (!TokenOperation.refresh(toke.getToke())) {
toke = getLogin(dPasswordAuthModel);
}
}
} catch (InnerInvokException e) {
e.printStackTrace();
}
// IdPasswordAuthModel dPasswordAuthModel = new IdPasswordAuthModel();
// dPasswordAuthModel.setLoginId(loginId);
// dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
// Toke toke = null;
// try {
// toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
// if (ObjectUtils.isEmpty(toke)) {
// toke = getLogin(dPasswordAuthModel);
// } else {
// RequestContext.setProduct(productWeb);
// if (!TokenOperation.refresh(toke.getToke())) {
// toke = getLogin(dPasswordAuthModel);
// }
// }
// } catch (InnerInvokException e) {
// e.printStackTrace();
// }
Toke toke=new Toke();
toke.setProduct(product);
toke.setAppKey(appKey);
toke.setToke(amosRequestContext.getToken());
redisTemplate.opsForValue().set(buildKey(userName), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
return toke;
}
private Toke getLogin(IdPasswordAuthModel dPasswordAuthModel) {
Toke toke = new Toke();
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
FeignClientResult feignClientResult = Privilege.authClient.idpassword(dPasswordAuthModel);
Map map = (Map) feignClientResult.getResult();
if (map != null) {
toke.setToke(map.get("token").toString());
toke.setProduct(productWeb);
toke.setProduct(product);
toke.setAppKey(appKey);
redisTemplate.opsForValue().set(buildKey(dPasswordAuthModel.getLoginId()), JSONObject.toJSONString(toke), 28, TimeUnit.DAYS);
}
......@@ -642,7 +667,7 @@ public class RemoteSecurityService {
public AgencyUserModel getAgencyUserModel(String token) {
RequestContext.setToken(token);
RequestContext.setAppKey(appKey);
RequestContext.setProduct(productWeb);
RequestContext.setProduct(product);
try {
AgencyUserModel result = Privilege.agencyUserClient.getme().getResult();
return result;
......
......@@ -33,6 +33,14 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<!--平台用户登录-->
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-authtoken</artifactId>
<version>1.7.13-SNAPSHOT</version>
</dependency>
</dependencies>
<modules>
......
......@@ -90,7 +90,13 @@ dcs.x.hw.appKey=s+YkvQhwilx91TRJHhNDmw==
equip.enabled =true
management.endpoints.enabled-by-default=false
#management.endpoints.enabled-by-default=false
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
# 权限标识-物联区域
auth-key-area=area_info
......
......@@ -9,12 +9,37 @@ spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
#security.password=a1234560
#security.loginId=fas_autosys
#
##应用product appkey
#security.productWeb=STUDIO_APP_WEB
#security.appKey =studio_normalapp_2681691
#security.password=a1234560
#security.loginId=fas_autosys
##应用product appkey
#security.productWeb=STUDIO_APP_WEB
#security.appKey =studio_normalapp_2681691
amos.system.user.user-name=fas_autosys
amos.system.user.password=a1234560
amos.system.user.app-key=studio_normalapp_2681691
amos.system.user.product=AMOS_STUDIO_WEB
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKey =studio_normalapp_2681691
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
eureka.client.registry-fetch-interval-seconds=5
......
......@@ -123,7 +123,16 @@ mybatis.interceptor.enabled = false
## 消防救援保障部ID
fire-rescue=1432549862557130753
management.endpoints.enabled-by-default=false
#management.endpoints.enabled-by-default=false
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
#阿里云实时语音识别参数
speech-config.access-key-id=LTAI5t62oH95jgbjRiNXPsho
speech-config.access-key-secret=shy9SpogYgcdDoyTB3bvP21VSRmz8n
......
......@@ -22,4 +22,9 @@ mybatis-plus.mapper-locations=classpath:mapper/*
## redis失效时间
redis.cache.failure.time=10800
management.endpoints.enabled-by-default=false
#management.endpoints.enabled-by-default=false
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
\ No newline at end of file
......@@ -4,6 +4,7 @@ import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticSearchRestHealthContributorAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
......@@ -36,7 +37,8 @@ import java.net.UnknownHostException;
* @author amos
* @version $Id: LatentDangerApplication.java, v 0.1 2018年11月26日 下午4:56:29 amos Exp $
*/
@SpringBootApplication
@SpringBootApplication(exclude = { ElasticSearchRestHealthContributorAutoConfiguration.class,//es健康检测
})
@EnableTransactionManagement
@EnableConfigurationProperties
@ServletComponentScan
......
......@@ -27,11 +27,19 @@ spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
security.password=a1234560
security.loginId=jc_wjk006
security.productWeb=STUDIO_APP_WEB
#security.password=a1234560
#security.loginId=jc_wjk006
#security.productWeb=STUDIO_APP_WEB
#security.productApp=STUDIO_APP_MOBILE
#security.appKey=studio_normalapp_3168830
security.productApp=STUDIO_APP_MOBILE
security.appKey=studio_normalapp_3168830
amos.system.user.user-name=jc_wjk006
amos.system.user.password=a1234560
amos.system.user.app-key=studio_normalapp_3168830
amos.system.user.product=STUDIO_APP_WEB
#redis 配置
spring.redis.database=1
......
......@@ -64,4 +64,9 @@ latentDanger.feign.name=AMOS-LATENT-DANGER
Knowledgebase.fegin.name=AMOS-API-KNOWLEDGEBASE
## 消防救援保障部ID
fire-rescue=1432549862557130753
management.endpoints.enabled-by-default=false
#management.endpoints.enabled-by-default=false
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
\ No newline at end of file
......@@ -9,11 +9,22 @@ eureka.client.serviceUrl.defaultZone=http://172.16.10.211:10001/eureka/
jcs.fegin.name=JCS
security.password=a1234560
security.loginId=jc_wjk006
security.productWeb=STUDIO_APP_WEB
#security.password=a1234560
#security.loginId=jc_wjk006
#security.productWeb=STUDIO_APP_WEB
#security.productApp=STUDIO_APP_MOBILE
#security.appKey=studio_normalapp_3168830
security.productApp=STUDIO_APP_MOBILE
security.appKey=studio_normalapp_3168830
amos.system.user.user-name=jc_wjk006
amos.system.user.password=a1234560
amos.system.user.app-key=studio_normalapp_3168830
amos.system.user.product=STUDIO_APP_WEB
#redis 配置
spring.redis.database=1
spring.redis.host=172.16.10.211
......
......@@ -67,4 +67,10 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
management.endpoints.enabled-by-default=false
\ No newline at end of file
#management.endpoints.enabled-by-default=false
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
\ No newline at end of file
......@@ -27,11 +27,20 @@ spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
security.password=a1234560
security.loginId=jc_wjk006
security.productWeb=STUDIO_APP_WEB
#security.password=a1234560
#security.loginId=jc_wjk006
#security.productWeb=STUDIO_APP_WEB
#security.productApp=STUDIO_APP_MOBILE
#security.appKey=studio_normalapp_3168830
security.productApp=STUDIO_APP_MOBILE
security.appKey=studio_normalapp_3168830
amos.system.user.user-name=jc_wjk006
amos.system.user.password=a1234560
amos.system.user.app-key=studio_normalapp_3168830
amos.system.user.product=STUDIO_APP_WEB
#redis 配置
spring.redis.database=1
......
......@@ -58,6 +58,13 @@ rule.definition.default-agency=STATE_GRID
jcs.fegin.name=JCS
emergency.command.section.id=1418223840361709569
management.endpoints.enabled-by-default=false
#management.endpoints.enabled-by-default=false
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
equipment.hierarchy=1,2,4,6
\ No newline at end of file
......@@ -5,11 +5,19 @@ spring.datasource.password= Yeejoin@2020
## eureka properties:
eureka.client.serviceUrl.defaultZone=http://172.16.10.211:10001/eureka/
security.password=a1234560
security.loginId=jc_wjk006
security.productWeb=STUDIO_APP_WEB
#security.password=a1234560
#security.loginId=jc_wjk006
#security.productWeb=STUDIO_APP_WEB
#security.productApp=STUDIO_APP_MOBILE
#security.appKey=studio_normalapp_3168830
security.productApp=STUDIO_APP_MOBILE
security.appKey=studio_normalapp_3168830
amos.system.user.user-name=jc_wjk006
amos.system.user.password=a1234560
amos.system.user.app-key=studio_normalapp_3056965
amos.system.user.product=STUDIO_APP_WEB
#redis 配置
......
......@@ -73,4 +73,10 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
management.endpoints.enabled-by-default=false
\ No newline at end of file
#management.endpoints.enabled-by-default=false
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
\ No newline at end of file
......@@ -5,3 +5,10 @@ spring.profiles.active=dev
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.serialization.write-dates-as-timestamps=true
## ӽӿĵ֤
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
\ No newline at end of file
......@@ -35,3 +35,11 @@ spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## 增加接口文档验证
knife4j.enable=true
knife4j.basic.enable=true
knife4j.basic.username= admin
knife4j.basic.password= yeejoin@2020
\ 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