新增注解@EnableGatewayCas
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.hcframe.gateway;
|
||||
|
||||
import com.hcframe.gateway_cas_stater.annotate.EnableGatewayCas;
|
||||
import com.hcframe.redis.RedisUtil;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -9,6 +10,7 @@ import org.springframework.context.annotation.Import;
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
@Import(RedisUtil.class)
|
||||
@EnableGatewayCas
|
||||
public class GatewayApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.hcframe.gateway.controller;
|
||||
|
||||
import com.hcframe.base.common.ResultVO;
|
||||
import com.hcframe.gateway_cas_stater.config.CasGatewayClientConfig;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
public class GatewayController {
|
||||
|
||||
final
|
||||
CasGatewayClientConfig casGatewayClientConfig;
|
||||
|
||||
public GatewayController(CasGatewayClientConfig casGatewayClientConfig) {
|
||||
this.casGatewayClientConfig = casGatewayClientConfig;
|
||||
}
|
||||
|
||||
@GetMapping("gateway/cas")
|
||||
public ResultVO<Map<String,String>> getCasUrl(){
|
||||
Map<String,String> map=new HashMap<>(2);
|
||||
map.put("cas", casGatewayClientConfig.casServiceUrl + casGatewayClientConfig.casContextPath + casGatewayClientConfig.getLoginUrl());
|
||||
map.put("config", "http://192.168.1.130:8084/user/cas/valid");
|
||||
return ResultVO.getSuccess(map);
|
||||
}
|
||||
}
|
||||
@@ -99,11 +99,4 @@ feign:
|
||||
enabled: true
|
||||
hystrix:
|
||||
enabled: true
|
||||
hcframe:
|
||||
cas:
|
||||
casServiceUrl: http://192.168.1.131:8080
|
||||
serviceUrl: http://192.168.1.130:9527
|
||||
clientContextPath: /
|
||||
cookieHolderPattern: com.hcframe.gateway.config.MyDataStorage
|
||||
white-url: "^(.*(/logout?))|(/user/cas/url)$"
|
||||
|
||||
|
||||
@@ -107,9 +107,3 @@ feign:
|
||||
enabled: true
|
||||
hystrix:
|
||||
enabled: true
|
||||
hcframe:
|
||||
cas:
|
||||
casServiceUrl: http://192.168.1.131:8080
|
||||
serviceUrl: http://192.168.1.130:9527
|
||||
clientContextPath: /
|
||||
cookieHolderPattern: com.hcframe.gateway.config.MyDataStorage
|
||||
|
||||
@@ -102,9 +102,3 @@ feign:
|
||||
enabled: true
|
||||
hystrix:
|
||||
enabled: true
|
||||
hcframe:
|
||||
cas:
|
||||
casServiceUrl: http://192.168.1.131:8080
|
||||
serviceUrl: http://192.168.1.130:8084
|
||||
clientContextPath: /
|
||||
cookieHolderPattern: com.hcframe.gateway.config.MyDataStorage
|
||||
|
||||
@@ -26,3 +26,14 @@ mybatis:
|
||||
configuration:
|
||||
# 开启Sql日志记录
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
hcframe:
|
||||
cas:
|
||||
enabled: true
|
||||
casServiceUrl: http://192.168.1.131:8080
|
||||
clientContextPath: /
|
||||
white-url: ^(.*(/logout?))|(/user/cas/url)$
|
||||
cas-context-path: /cas
|
||||
service-url: http://192.168.1.130:9527
|
||||
cookie-holder-pattern: com.hcframe.gateway.config.MyDataStorage
|
||||
login-url: /login
|
||||
logout-url: /logout
|
||||
|
||||
Reference in New Issue
Block a user