Commit ebd6ccaa authored by 赵啸非's avatar 赵啸非

修改同步用户

parent 0fd64be2
......@@ -10,6 +10,7 @@ import com.mortals.xhx.feign.device.IDeviceFeign;
import com.mortals.xhx.module.device.model.DeviceQuery;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -37,6 +38,10 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device
@Autowired
private IDeviceFeign deviceFeign;
@Value("${token.loginName:'admin'}")
private String loginName;
@Value("${token.password:'admin'}")
private String password;
@Override
protected void validData(DeviceEntity entity, Context context) throws AppException {
......@@ -142,8 +147,8 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device
private String getToken() {
LoginForm loginForm = new LoginForm();
loginForm.setLoginName("admin");
loginForm.setPassword("xhx@yb123");
loginForm.setLoginName(loginName);
loginForm.setPassword(password);
Rest<String> rest = deviceFeign.getToken(loginForm);
String token = rest.getData();
return token;
......
......@@ -48,6 +48,8 @@ application:
uncheckUrl: /refresh,/error,/login/login,/login/index,/login/logout,/customer/login/login,/customer/login/logout,/securitycode/createCode,/customer/trial/save,/file/common/*,/file/preview/*,/test*,/api/asset/*,/api/*,/zwfw/*,/ws/*,/swagger-ui*,/topic/*,/uploads/*
token:
head: mortal
loginName: admin
password: admin
hystrix:
command:
default:
......
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