测试蒙速办对接

This commit is contained in:
wans 2022-02-27 11:05:24 +08:00
parent 68d7d4674f
commit c921d9ef8a
7 changed files with 101 additions and 8 deletions

View File

@ -128,6 +128,13 @@
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<!-- inspur蒙速办对接 -->
<dependency>
<groupId>cn.com.tenlion</groupId>
<artifactId>inspur-msb-h5-auth</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>

View File

@ -3,7 +3,7 @@ package cn.com.tenlion.commonpopulation;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.boot.web.servlet.ServletComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
@ -13,6 +13,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@SpringBootApplication(scanBasePackages = {"cn.com.tenlion", "ink.wgink"})
@MapperScan(basePackages = {"cn.com.tenlion.**.dao", "ink.wgink.**.dao"})
@ServletComponentScan(basePackages = "cn.com.tenlion")
public class CommonPopulationApplication {
public static void main(String[] args) {

View File

@ -0,0 +1,34 @@
package cn.com.tenlion.commonpopulation.controller.route;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.common.component.SecurityComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
/**
* @author xwangs
* @create 2022-02-17 10:09
* @description
*/
@Controller
@RequestMapping("inspur")
public class InspurAuthController extends DefaultBaseController {
@Autowired
protected SecurityComponent securityComponent;
@GetMapping("index")
public ModelAndView inspurIndex(HttpServletRequest res){
ModelAndView mv = new ModelAndView();
if(httpSession.getAttribute("token") !=null){
mv.addObject("token", httpSession.getAttribute("token"));
}
mv.setViewName("inspur-index");
return mv;
}
}

View File

@ -14,7 +14,7 @@ spring:
login-url: /oauth/login
login-failure: /oauth/login?error
login-process: /userlogin
assets-matchers: /assets/**
assets-matchers: /assets/**,/inspur/**
thymeleaf:
prefix: classpath:/templates/
suffix: .html
@ -166,3 +166,7 @@ logging:
level:
root: error
ink.wgink: debug
inspur-auth:
appId: 9cadc6c3-53df-407f-b83f-fe42f36a3488
redirectUri: http://1.24.238.149:37210/population/inspur/index

View File

@ -12,7 +12,7 @@ spring:
login-url: /oauth/login
login-failure: /oauth/login?error
login-process: /userlogin
assets-matchers: /assets/**
assets-matchers: /assets/**,/inspur/**
thymeleaf:
prefix: classpath:/templates/
suffix: .html
@ -92,11 +92,13 @@ spring:
# 安全
security:
oauth2:
oauth-server: http://192.168.0.155:7011/usercenter
oauth-server: http://1.24.238.149:37210/usercenter/
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
client:
client-id: c00491da506842ddb516d4b1e5ccd13e
client-secret: bll3ZVZuUGZsSXBqckJjRVNEMkc3bklic0pOZDYyWkk0SFd2eDY3N3dhUGxIdG9KZmEyTjJIRnI0dG1McEdEVA==
#client-id: c00491da506842ddb516d4b1e5ccd13e
client-id: 8efff6f8f7fc463e8eb63e3b5174f448
#client-secret: bll3ZVZuUGZsSXBqckJjRVNEMkc3bklic0pOZDYyWkk0SFd2eDY3N3dhUGxIdG9KZmEyTjJIRnI0dG1McEdEVA==
client-secret: b1hPdUE1NkJlM1RmbS9MTVlnYUR2QTI5NEcyTFpGandTNC8zVTh5cW5CTGxIdG9KZmEyTjJIRnI0dG1McEdEVA==
user-authorization-uri: ${security.oauth2.oauth-server}/oauth2_client/authorize
access-token-uri: ${security.oauth2.oauth-server}/oauth2_client/token
grant-type: authorization_code
@ -108,7 +110,8 @@ security:
authorization:
check-token-access: ${security.oauth2.oauth-server}/oauth2_client/token_key
api-path:
user-center: http://192.168.0.155:7011/usercenter
#user-center: http://192.168.0.155:7011/usercenter
user-center: http://1.24.238.149:37210/usercenter/
# 数据库
mybatis:
@ -168,3 +171,7 @@ logging:
root: error
ink.wgink: debug
cn.com.tenlion: debug
inspur-auth:
appId: 9cadc6c3-53df-407f-b83f-fe42f36a3488
redirectUri: http://dlho.cn:9003/signup/inspur/index

View File

@ -0,0 +1,13 @@
MIICXAIBAAKBgQCs5mYn9oTlN4tKWkPSdfkhrp1IouzfggNIJvQBMkCqffc3qLAT
Gd3Jh245hdUrDIi3L/r5H3b+MwAgNxX52ywiXdrEhk7FxtHRXTZJ8YNxmDuL8XqR
H1DcNaDPS74Qx80EsXjSzhQQ+GCvJ8cUw2d+TbxM1KFo6I2nCJP/m+0ChQIDAQAB
AoGAOMeI8MLCLcwp0AcIksrvP6JqQHpQs62sijtQkjwAhHzNfNfGyt8JuK7jAbzz
nimFlDMLhlhQ6XWyKuIsM1tIiI4mZs1Nji/9mJoMylRjqKrZDI213nSY7FHq2CCf
Ti8dVSlwLzfEM+2y2/R9MyX7tqmFxvuDfgCGSxK4z9hhEIECQQDh1/BrdnGyx68t
bckXuZmSqGk1THGk9zyh4FAuBdXjaRVUwOKdSnE6evCrdsVUSAPtGHLeuxJDQJUK
iV11XVLRAkEAw/yt8yji2Fqhau5xd/c4yrj9+JnK8qla7yNFPgheHpv65BbTwzgz
pJmGuwJnVByLUyVnU6w56FxG0SbjgqPZdQJAC5lxqbNNp6cF4klvOJ65uoSX0rr4
Y0angJDqzVJTZ/ivtciqWvXF1wEVd1kETY3dVcIZtELbb0TT4tSnTi3a4QJAdsLK
Idv3wkUBJYwB5EFB/84j0B5Zlbw8J0cHMXTem8vHN6oBfn2zBZ4mv3HQbW6ymprC
xzhJCt3H5/uZx9ND9QJBALt/kH8vSHEo/JLZk87SX7NQwk9OCLpaedPRIiB3dA5U
US1pl0Ixp/acwuUfsvZ4IAcNW9FC0+Qs0xowKMJIiiY=

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div>
<h3>蒙速办调取H5主页面</h3>
</div>
<div>
<input type="text" id="tokenHidden" th:value="${token}">
</div>
</body>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script th:inline="javascript" type="text/javascript">
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'animate-numbers'], function() {
});
</script>
</html>