角色权限模块处理

master
shijie 4 years ago
parent c14be59329
commit 749c43bd1d
  1. 26
      dq-financial-crms/pom.xml
  2. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/DqFinancialCrmsApplication.java
  3. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/config/IPageConfig.java
  4. 5
      dq-financial-crms/src/main/resources/bootstrap.properties
  5. 7
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/SecurityConfig.java
  6. 8
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/RolePermissionController.java
  7. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/AuthPermissionDao.java
  8. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/RolePermissionMapper.java
  9. 4
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/feign/HrauthFeignService.java
  10. 8
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/feign/HrmsFeignService.java
  11. 8
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/handle/SecurityUser.java
  12. 15
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/handle/UrlFilterInvocationSecurityMetadataSource.java
  13. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/RolePermissionService.java
  14. 14
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/RolePermissionServiceImpl.java
  15. 4
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserDetailsServiceImpl.java
  16. 4
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/AuthPermissionDao.xml
  17. 4
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/RolePermissionMapper.xml
  18. 18
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/PermissionController.java
  19. 4
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/PermissionService.java
  20. 21
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/PermissionServiceImpl.java
  21. 12
      dq-framework-common/pom.xml
  22. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/RoleEntity.java
  23. 12
      dq-framework-utils/pom.xml
  24. 3
      dq-govern-gateway/src/main/resources/jwt.properties
  25. BIN
      dq-govern-gateway/target/classes/META-INF/dq-govern-gateway.kotlin_module
  26. 32
      dq-govern-gateway/target/classes/application.yml
  27. 19
      dq-govern-gateway/target/classes/bootstrap.properties
  28. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/DqGovernGatewayApplication.class
  29. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/SpringContextHolder.class
  30. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/config/ApiGlobalFilter.class
  31. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/config/FinancialCorsConfiguration.class
  32. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/util/OdcProperties$Async.class
  33. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/util/OdcProperties$Config.class
  34. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/util/OdcProperties$Oss.class
  35. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/util/OdcProperties.class
  36. BIN
      dq-govern-gateway/target/classes/com/daqing/financial/gateway/util/RedisUtil.class
  37. 4
      dq-govern-gateway/target/classes/jwt.properties

@ -21,12 +21,12 @@
<dependencies>
<!--<dependency>
<dependency>
<groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-hrms-auth</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>-->
</dependency>
<dependency>
<groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-api</artifactId>
@ -45,10 +45,6 @@
<artifactId>ooxml-schemas</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
@ -66,6 +62,12 @@
<version>2.3.28</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<dependencyManagement>
@ -86,6 +88,18 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>-->
</plugins>
</build>

@ -1,15 +1,18 @@
package com.daqing.financial.crms;
import com.daqing.financial.hrauth.config.SecurityConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
@EnableFeignClients(basePackages = "com.daqing.financial.crms.feign")
@EnableDiscoveryClient
@SpringBootApplication
@ComponentScan(basePackages = "com.daqing")
@Import({SecurityConfig.class})
public class DqFinancialCrmsApplication {
public static void main(String[] args) {

@ -1,3 +1,4 @@
/*
package com.daqing.financial.crms.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
@ -11,3 +12,4 @@ public class IPageConfig {
return new PaginationInterceptor();
}
}
*/

@ -28,6 +28,11 @@ spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#请求处理的超时时间
ribbon.ReadTimeout: 120000
#请求连接的超时时间
ribbon.ConnectTimeout: 120000
# 正式环境(prod)
#服务名称
#spring.application.name=dq-financial-crms

@ -112,9 +112,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 标识访问 `/home` 这个接口,需要具备`ADMIN`角色
// registry.antMatchers("/home").hasRole("ADMIN");
// 标识只能在 服务器本地ip[127.0.0.1或localhost] 访问 `/home` 这个接口,其他ip地址无法访问
// registry.antMatchers("/hrms/auth/userlogin/getBackPwd").hasIpAddress("127.0.0.1");
registry.antMatchers("/hrms/auth/permission/getUserRoles").hasIpAddress("127.0.0.1");
// 允许匿名的url - 可理解为放行接口 - 多个接口使用,分割
registry.antMatchers("/**").permitAll();
//registry.antMatchers("/**").permitAll();
// registry.antMatchers("/**").access("hasAuthority('admin')");
// OPTIONS(选项):查找适用于一个特定网址资源的通讯选择。 在不需执行具体的涉及数据传输的动作情况下, 允许客户端来确定与资源相关的选项以及 / 或者要求, 或是一个服务器的性能
//registry.antMatchers(HttpMethod.OPTIONS, "/**").denyAll();
@ -139,7 +139,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
*/
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/**");
//web.ignoring().antMatchers("/**");
web.ignoring().antMatchers("/hrms/auth/permission/getUserRoles");
}
}

@ -171,5 +171,13 @@ public class RolePermissionController {
return new ResponseResult<List<RoleEntity>>().SUCCESS(roleList);
}
@Transactional
@GetMapping("/queryPermissionList")
public ResponseResult queryPermissionList(@RequestParam("jiacan")String jiacan) {
List<PermissionEntity> permissionList = permissionService.getList(jiacan);
return new ResponseResult<List<PermissionEntity>>().SUCCESS(permissionList);
}
}

@ -16,5 +16,5 @@ import java.util.List;
*/
@Mapper
public interface AuthPermissionDao extends BaseMapper<PermissionEntity> {
List<RolePermissionEntity> selectRolePermiByPermiId(Long permissionId);
//List<RolePermissionEntity> selectRolePermiByPermiId(Long permissionId);
}

@ -42,7 +42,7 @@ public interface RolePermissionMapper extends BaseMapper<RolePermissionEntity> {
EmployeeRoleEntity selectRoleByUserId(Long id);
List<RolePermissionEntity> selectRolePermiByPermiId(Long permissionId);
//List<RolePermissionEntity> selectRolePermiByPermiId(Long permissionId);
List<PermissionEntity> queryPermissionTree();

@ -1,5 +1,6 @@
package com.daqing.financial.hrauth.feign;
import com.daqing.framework.domain.hrms.PermissionEntity;
import com.daqing.framework.domain.hrms.RoleEntity;
import com.daqing.framework.model.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
@ -17,4 +18,7 @@ public interface HrauthFeignService {
@GetMapping("/hrms/auth/permission/getUserRoles")
ResponseResult<List<RoleEntity>> getUserRoles(@RequestParam("userId")Integer userId);
@GetMapping("/hrms/auth/permission/queryPermissionList")
ResponseResult<List<PermissionEntity>> queryPermissionList(@RequestParam("jiacan")String jiacan);
}

@ -1,7 +1,9 @@
package com.daqing.financial.hrauth.feign;
import com.daqing.framework.domain.hrms.EmployeeEntity;
import com.daqing.framework.domain.hrms.PermissionEntity;
import com.daqing.framework.domain.hrms.RoleEntity;
import com.daqing.framework.domain.hrms.RolePermissionEntity;
import com.daqing.framework.model.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@ -18,4 +20,10 @@ public interface HrmsFeignService {
@GetMapping("/hrms/employee/getEmployeeByUserId")
ResponseResult<EmployeeEntity> getEmployeeByUserId(@RequestParam("userId") Integer userId);
@GetMapping("/hrms/permission/queryPermissionList")
ResponseResult<List<PermissionEntity>> queryPermissionList();
@GetMapping("/hrms/permission/queryRolePermissionList")
ResponseResult<List<RolePermissionEntity>> queryRolePermissionList(@RequestParam("id") Long id);
}

@ -58,10 +58,14 @@ public class SecurityUser implements UserDetails {
public Collection<? extends GrantedAuthority> getAuthorities() {
Collection<GrantedAuthority> authorities = new ArrayList<>();
if (!CollectionUtils.isEmpty(this.roleList)) {
for (Object role : this.roleList) {
SimpleGrantedAuthority authority = new SimpleGrantedAuthority("user_role");
for (RoleEntity role : this.roleList) {
SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role.getCode());
authorities.add(authority);
}
// for (Object role : this.roleList) {
// SimpleGrantedAuthority authority = new SimpleGrantedAuthority("user_role");
// authorities.add(authority);
// }
}
// SimpleGrantedAuthority authority = new SimpleGrantedAuthority("ADMIN");

@ -5,9 +5,12 @@ import com.daqing.financial.hrauth.dao.AuthPermissionDao;
import com.daqing.financial.hrauth.dao.AuthRoleDao;
import com.daqing.financial.hrauth.dao.RolePermissionMapper;
import com.daqing.financial.hrauth.enums.Constants;
import com.daqing.financial.hrauth.feign.HrauthFeignService;
import com.daqing.financial.hrauth.feign.HrmsFeignService;
import com.daqing.framework.domain.hrms.PermissionEntity;
import com.daqing.framework.domain.hrms.RoleEntity;
import com.daqing.framework.domain.hrms.RolePermissionEntity;
import com.daqing.framework.model.response.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
@ -39,6 +42,9 @@ public class UrlFilterInvocationSecurityMetadataSource implements FilterInvocati
@Resource
AuthRoleDao roleMapper;
@Resource
HrmsFeignService hrmsFeignService;
/***
* 返回该url所需要的用户权限信息
@ -65,11 +71,16 @@ public class UrlFilterInvocationSecurityMetadataSource implements FilterInvocati
}
// 数据库中所有url
List<PermissionEntity> permissionList = permissionMapper.selectList(null);
//List<PermissionEntity> permissionList = permissionMapper.selectList(null);
//String jiacan=null;
ResponseResult responseResult = hrmsFeignService.queryPermissionList();
List<PermissionEntity> permissionList = (List<PermissionEntity>) responseResult.getData();
for (PermissionEntity permission : permissionList) {
// 获取该url所对应的权限
if (requestUrl.equals(permission.getUrl())) {
List<RolePermissionEntity> permissionEntityList = rolePermissionMapper.selectList(new QueryWrapper<RolePermissionEntity>().eq("permission_id",permission.getId()));
//List<RolePermissionEntity> permissionEntityList = rolePermissionMapper.selectList(new QueryWrapper<RolePermissionEntity>().eq("permission_id",permission.getId()));
ResponseResult responseResult2 = hrmsFeignService.queryRolePermissionList(permission.getId());
List<RolePermissionEntity> permissionEntityList = (List<RolePermissionEntity>) responseResult2.getData();
SecurityUser userRole = (SecurityUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();//获取spring security封装的当前用户信息对象
List<RoleEntity> list = userRole.getRoleList();

@ -42,5 +42,7 @@ public interface RolePermissionService extends IService<RolePermissionEntity> {
List<RolePermissionEntity> queryPermissionArrById(Long roleId);
List<RoleEntity> getUserRoles(Integer userId);
List<PermissionEntity> getList(String jiacan);
}

@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.hrauth.dao.AuthEmployeeRoleDao;
import com.daqing.financial.hrauth.dao.AuthRoleDao;
import com.daqing.financial.hrauth.dao.RolePermissionMapper;
import com.daqing.financial.hrauth.dao.UserLoginDao;
import com.daqing.financial.hrauth.dao.*;
import com.daqing.financial.hrauth.service.RolePermissionService;
import com.daqing.framework.domain.hrms.EmployeeRoleEntity;
import com.daqing.framework.domain.hrms.PermissionEntity;
@ -34,6 +31,9 @@ public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper,
@Resource
private AuthEmployeeRoleDao userRoleMapper;
@Resource
private AuthPermissionDao permissionMapper;
@Override
public List<PermissionEntity> listWithTree() {
List<PermissionEntity>list = this.getBaseMapper().queryPermissionTree();
@ -132,4 +132,10 @@ public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper,
return roleList;
}
@Override
public List<PermissionEntity> getList(String jiacan) {
List<PermissionEntity> permissionList = permissionMapper.selectList(null);
return permissionList;
}
}

@ -7,6 +7,7 @@ import com.daqing.financial.hrauth.dao.AuthRoleDao;
import com.daqing.financial.hrauth.dao.UserLoginDao;
import com.daqing.financial.hrauth.feign.HrauthFeignService;
import com.daqing.financial.hrauth.handle.SecurityUser;
import com.daqing.financial.hrauth.service.RolePermissionService;
import com.daqing.framework.domain.hrms.EmployeeRoleEntity;
import com.daqing.framework.domain.hrms.RoleEntity;
import com.daqing.framework.domain.hrms.UserEntity;
@ -49,6 +50,8 @@ public class UserDetailsServiceImpl implements UserDetailsService {
private HrauthFeignService hrauthFeignService;
@Autowired
private UserLoginDao userLoginDao;
@Autowired
private RolePermissionService permissionService;
/***
* 根据账号获取用户信息
@ -116,6 +119,7 @@ public class UserDetailsServiceImpl implements UserDetailsService {
log.info("来了调用远程接口~~~~~~~~~~~~~~~~~~~~~~~~~~");
ResponseResult responseResult = hrauthFeignService.getUserRoles(userId);
List<RoleEntity> roleList = (List<RoleEntity>) responseResult.getData();
//List<RoleEntity> roleList = permissionService.getUserRoles(userId);
return roleList;
}

@ -19,9 +19,9 @@
<result property="motifyTime" column="motify_time"/>
</resultMap>
<select id="selectRolePermiByPermiId" parameterType="long"
<!-- <select id="selectRolePermiByPermiId" parameterType="long"
resultType="com.daqing.framework.domain.hrms.RolePermissionEntity">
select id, role_id, permission_id from hrms_role_permission
WHERE permission_id=#{permissionId}
</select>
</select>-->
</mapper>

@ -87,11 +87,11 @@
select role_id from hrms_employee_role where user_id=#{userId}
</select>
<select id="selectRolePermiByPermiId" parameterType="long"
<!-- <select id="selectRolePermiByPermiId" parameterType="long"
resultType="com.daqing.framework.domain.hrms.RolePermissionEntity">
select id, role_id, permission_id from hrms_role_permission
WHERE permission_id=#{permissionId}
</select>
</select>-->
<select id="queryPermissionTree"
resultMap="permissionRoleMap">

@ -3,8 +3,10 @@ package com.daqing.financial.hrms.controller;
import com.daqing.financial.hrms.PermissionControllerApi;
import com.daqing.financial.hrms.service.PermissionService;
import com.daqing.framework.domain.hrms.PermissionEntity;
import com.daqing.framework.domain.hrms.RolePermissionEntity;
import com.daqing.framework.model.response.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
@ -81,4 +83,20 @@ public class PermissionController implements PermissionControllerApi {
return ResponseResult.SUCCESS();
}
@Transactional
@GetMapping("/queryPermissionList")
public ResponseResult queryPermissionList() {
List<PermissionEntity> permissionList = permissionService.queryPermissionList();
return new ResponseResult<List<PermissionEntity>>().SUCCESS(permissionList);
}
@Transactional
@GetMapping("/queryRolePermissionList")
public ResponseResult queryRolePermissionList(@RequestParam("id") Long id) {
List<RolePermissionEntity> permissionEntityList = permissionService.queryRolePermissionList(id);
return new ResponseResult<List<RolePermissionEntity>>().SUCCESS(permissionEntityList);
}
}

@ -1,6 +1,7 @@
package com.daqing.financial.hrms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.daqing.framework.domain.hrms.RolePermissionEntity;
import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.domain.hrms.PermissionEntity;
@ -18,5 +19,8 @@ public interface PermissionService extends IService<PermissionEntity> {
List<PermissionEntity> listWithTree();
List<PermissionEntity> queryPermissionList();
List<RolePermissionEntity> queryRolePermissionList(Long id);
}

@ -1,11 +1,15 @@
package com.daqing.financial.hrms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.hrms.dao.PermissionDao;
import com.daqing.financial.hrms.dao.RolePermissionDao;
import com.daqing.financial.hrms.service.PermissionService;
import com.daqing.framework.domain.hrms.PermissionEntity;
import com.daqing.framework.domain.hrms.RolePermissionEntity;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@ -14,6 +18,11 @@ import java.util.stream.Collectors;
@Service("permissionService")
public class PermissionServiceImpl extends ServiceImpl<PermissionDao, PermissionEntity> implements PermissionService {
@Resource
PermissionDao permissionMapper;
@Resource
RolePermissionDao rolePermissionMapper;
@Override
public List<PermissionEntity> listWithTree() {
return getPermissionTreeList(this.list(), 0L);
@ -27,4 +36,16 @@ public class PermissionServiceImpl extends ServiceImpl<PermissionDao, Permission
.collect(Collectors.toList());
}
@Override
public List<PermissionEntity> queryPermissionList() {
List<PermissionEntity> permissionList = permissionMapper.selectList(null);
return permissionList;
}
@Override
public List<RolePermissionEntity> queryRolePermissionList(Long id) {
List<RolePermissionEntity> permissionEntityList = rolePermissionMapper.selectList(new QueryWrapper<RolePermissionEntity>().eq("permission_id",id));
return permissionEntityList;
}
}

@ -9,14 +9,24 @@
<description>每一个微服务公共的依赖</description>
<build>
<plugins>
<plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

@ -41,4 +41,9 @@ public class RoleEntity implements Serializable {
* 更新时间
*/
private Date motifyTime;
/**
* 编码
*/
private String code;
}

@ -15,14 +15,24 @@
<description>系统通用的工具类</description>
<build>
<plugins>
<plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

@ -25,7 +25,8 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/api-guarantee/dg-payment-confirmation-consider/paymentConfirmationListExport,\
/api-guarantee/dg-loan-notice/loanNoticeListExport,\
/api-guarantee/dg-loan-notice/exportLoanNotice,\
/api-hrms/hrms/user/uploadFile
/api-hrms/hrms/user/uploadFile,\
/apiHrmsAuth/hrms/auth/permission/getUserRoles

@ -1,32 +0,0 @@
spring:
cloud:
gateway:
routes:
# - id: test_route
# uri: https://www.baidu.com
# predicates:
# - Query=url,baidu
#
# - id: qq_route
# uri: https://www.qq.com
# predicates:
# - Query=url,qq//localhost:8080/api
#
- id: crms_route
uri: http://localhost:8000/dq-financial-crms
predicates:
- Path=/api-crms/**
filters:
- RewritePath=/api-crms/(?<segment>.*), /$\{segment}
- id: hrms_route
uri: http://localhost:7000/dq-financial-hrms
predicates:
- Path=/api-hrms/**
filters:
- RewritePath=/api-hrms/(?<segment>.*), /$\{segment}
- id: hrms_auth_route
uri: http://localhost:9000/dq-financial-hrms-auth #lb://dq-financial-hrms-auth
predicates:
- Path=/apiHrmsAuth/**
filters:
- RewritePath=/apiHrmsAuth/(?<segment>.*), /$\{segment}

@ -1,19 +0,0 @@
#服务名称
spring.application.name=dq-govern-gateway
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.142:8848
spring.cloud.nacos.config.namespace=772e2607-b929-4246-9671-ee5a36d74d25
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
spring.cloud.nacos.config.ext-config[0].group=dev
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.redis.host=192.168.232.128
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0

@ -1,4 +0,0 @@
jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\
/apiHrmsAuth/hrms/auth/userlogin/login,\
/apiHrmsAuth/hrms/auth/userlogin/verifyMobile,\
/api-crms/sweagger-ui.html
Loading…
Cancel
Save