Quellcode durchsuchen

新增全时空影像系统相关配置

pull/137/head^2
xiaoying vor 1 Jahr
Ursprung
Commit
f20b71c4cd
7 geänderte Dateien mit 29 neuen und 3 gelöschten Zeilen
  1. +8
    -0
      src/main/java/com/tuoheng/gateway/commons/CommonsConfig.java
  2. +1
    -0
      src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java
  3. +6
    -0
      src/main/java/com/tuoheng/gateway/constants/AuthorityConstant.java
  4. +8
    -0
      src/main/java/com/tuoheng/gateway/utils/GatewayUrlPathUtil.java
  5. +2
    -1
      src/main/resources/application-dev.yml
  6. +2
    -1
      src/main/resources/application-prod.yml
  7. +2
    -1
      src/main/resources/application-test.yml

+ 8
- 0
src/main/java/com/tuoheng/gateway/commons/CommonsConfig.java Datei anzeigen

@@ -49,6 +49,10 @@ public class CommonsConfig {
* 机场系统接口地址
*/
public static String airportPermissionUrl;
/**
* 全时空系统接口地址
*/
public static String spacetimePermissionUrl;


@Value("${tuoheng.hhz-admin-perUrl}")
@@ -56,6 +60,10 @@ public class CommonsConfig {
hhzPermissionUrl = url;
}

@Value("${tuoheng.spacetime-admin-perUrl}")
public void setSpacetimePermissionUrl(String url) {
spacetimePermissionUrl = url;
}
@Value("${tuoheng.freeway-admin-perUrl}")
public void setFreewayPermissionUrl(String url) {
freewayPermissionUrl = url;

+ 1
- 0
src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java Datei anzeigen

@@ -93,6 +93,7 @@ public class WebSecurityConfig {
.pathMatchers("/weptsp/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_WEPTSP_ADMIN)
.pathMatchers("/airmonitor/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_AIRMONITOR_ADMIN)
.pathMatchers("/alert/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_ALERT_ADMIN)
.pathMatchers("/spacetime/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_SPACETIME_ADMIN)
.pathMatchers("/airport/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_AIRPORT_ADMIN)
.pathMatchers("/oidc/admin/user/**").authenticated()
.pathMatchers("/api/inspection/**").authenticated()

+ 6
- 0
src/main/java/com/tuoheng/gateway/constants/AuthorityConstant.java Datei anzeigen

@@ -76,4 +76,10 @@ public class AuthorityConstant {
*/
public static final String SCOPE_TUOHNEG_AIRPORT_ADMIN = "SCOPE_tuoheng-airport-admin";
//public static final String SCOPE_TUOHNEG_ALERT_MP= "SCOPE_tuoheng-alert-mp";

/**
* Spacetime 用户权限
*/
public static final String SCOPE_TUOHNEG_SPACETIME_ADMIN = "SCOPE_tuoheng-spacetime-admin";
//public static final String SCOPE_TUOHNEG_ALERT_MP= "SCOPE_tuoheng-alert-mp";
}

+ 8
- 0
src/main/java/com/tuoheng/gateway/utils/GatewayUrlPathUtil.java Datei anzeigen

@@ -46,6 +46,8 @@ public class GatewayUrlPathUtil {

private static final String AIRPORT_ADMIN = "tuoheng-airport-admin";

private static final String SPACETIME_ADMIN = "tuoheng-spacetime-admin";


/**
* 获取 gateway 路由前缀,匹配url
@@ -89,6 +91,9 @@ public class GatewayUrlPathUtil {
case ALERT_ADMIN:
apiPath = "/alert/admin";
break;
case SPACETIME_ADMIN:
apiPath = "/spacetime/admin";
break;
default:
break;
}
@@ -128,6 +133,9 @@ public class GatewayUrlPathUtil {
if (clientId.equals(AIRPORT_ADMIN)) {
url = CommonsConfig.airportPermissionUrl;
}
if (clientId.equals(SPACETIME_ADMIN)) {
url = CommonsConfig.spacetimePermissionUrl;
}
log.info("getRoleIdByApiUrlPermission -url:{},token:{}", url, token);
if (StringUtils.isNotBlank(url)) {
HttpHeaders resultRequestHeader = new HttpHeaders();

+ 2
- 1
src/main/resources/application-dev.yml Datei anzeigen

@@ -297,4 +297,5 @@ tuoheng:
waterway-admin-perUrl: http://192.168.11.11:9120/permission/getRoleIdList
weptsp-admin-perUrl: http://192.168.11.11:9140/permission/getRoleIdList
airmonitor-admin-perUrl: http://192.168.11.11:9130/permission/getRoleIdList
telecomumale-admin-perUrl: http://192.168.11.11:9150/permission/getRoleIdList
telecomumale-admin-perUrl: http://192.168.11.11:9150/permission/getRoleIdList
spacetime-admin-perUrl: http://192.168.11.11:9170/permission/getRoleIdList

+ 2
- 1
src/main/resources/application-prod.yml Datei anzeigen

@@ -289,4 +289,5 @@ tuoheng:
airmonitor-admin-perUrl: https://airmonitor.t-aaron.com/permission/getRoleIdList
weptsp-admin-perUrl: https://weptsp.t-aaron.com/permission/getRoleIdList
telecomumale-admin-perUrl: https://telecomumale.t-aaron.com/permission/getRoleIdList
alert-admin-perUrl: https://alert.t-aaron.com/permission/getRoleIdList
alert-admin-perUrl: https://alert.t-aaron.com/permission/getRoleIdList
spacetime-admin-perUrl: https://spacetime.t-aaron.com/permission/getRoleIdList

+ 2
- 1
src/main/resources/application-test.yml Datei anzeigen

@@ -297,4 +297,5 @@ tuoheng:
waterway-admin-perUrl: https://waterway-test.t-aaron.com/permission/getRoleIdList
weptsp-admin-perUrl: https://weptsp-test.t-aaron.com/permission/getRoleIdList
airmonitor-admin-perUrl: https://airmonitor-test.t-aaron.com/permission/getRoleIdList
telecomumale-admin-perUrl: https://telecomumale-test.t-aaron.com/permission/getRoleIdList
telecomumale-admin-perUrl: https://telecomumale-test.t-aaron.com/permission/getRoleIdList
spacetime-admin-perUrl: https://spacetime-test.t-aaron.com/permission/getRoleIdList

Laden…
Abbrechen
Speichern