Ver Fonte

山西财经大学单点登录

xiaofei há 2 anos atrás
pai
commit
790e29a9be

+ 2 - 2
cdut-exchange/src/main/resources/application.properties

@@ -15,9 +15,9 @@ spring.application.name=cdut-exchange
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
-db.name=exchange-api-v1.0.0
+db.name=exchange-api-1.0.0
 db.username=root
-db.password=root
+db.password=12345678
 
 #mysql\u914D\u7F6E
 com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true

+ 1 - 0
pom.xml

@@ -11,6 +11,7 @@
         <module>teachcloud-exchange-common</module>
         <module>xjtu-exchange</module>
         <module>cdut-exchange</module>
+        <module>sxufe-exchange</module>
     </modules>
 
     <properties>

+ 33 - 0
sxufe-exchange/.gitignore

@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

+ 84 - 0
sxufe-exchange/pom.xml

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>com.qmth.sxufe.exchange</groupId>
+    <artifactId>sxufe-exchange</artifactId>
+    <version>1.0.1</version>
+    <packaging>jar</packaging>
+    <description>山西财经大学单点登录</description>
+
+    <parent>
+        <groupId>com.qmth.teachcloud.exchange.service</groupId>
+        <artifactId>teachcloud-exchange-service</artifactId>
+        <version>1.0.1</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.qmth.teachcloud.exchange.common</groupId>
+            <artifactId>teachcloud-exchange-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <version>${spring-boot.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>9.0.64</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.qmth.sxufe</groupId>
+            <artifactId>cas-client-core</artifactId>
+            <version>3.1.12</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/src/main/resources/lib/cas-client-core-3.1.12.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>com.qmth.sxufe</groupId>
+            <artifactId>sso-client-java</artifactId>
+            <version>7.0.8</version>
+            <scope>system</scope>
+            <systemPath>${project.basedir}/src/main/resources/lib/sso-client-java-7.0.8.jar</systemPath>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.6.2</version>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <version>1.4.12</version>
+                <configuration>
+                    <repository>registry.cn-shenzhen.aliyuncs.com/cdut-exchange</repository>
+                    <tag>${project.version}</tag>
+                    <contextDirectory>${project.baseDir}</contextDirectory>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <pullNewerImage>true</pullNewerImage>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 26 - 0
sxufe-exchange/src/main/java/com/qmth/sxufe/SxufeExchangeApplication.java

@@ -0,0 +1,26 @@
+package com.qmth.sxufe;
+
+import com.qmth.boot.core.security.config.SecurityAutoConfiguration;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication(scanBasePackages = "com.qmth.*", exclude = {SecurityAutoConfiguration.class})
+@MapperScan({"com.qmth.teachcloud.exchange.common.mapper"})
+//主要就是定义扫描的路径从中找出标识了需要装配的类自动装配到spring的bean容器中,做过web开发的同学一定都有用过@Controller,@Service,@Repository注解,查看其源码你会发现,他们中有一个共同的注解@Component,没错@ComponentScan注解默认就会装配标识了@Controller,@Service,@Repository,@Component注解的类到spring容器中
+@EntityScan(basePackages = {"com.qmth.teachcloud.exchange.common.entity"})
+//用来扫描和发现指定包及其子包中的Entity定义
+@EnableTransactionManagement // spring开启事务支持
+@EnableAsync // 开启异步任务
+@EnableCaching // 开启缓存注解
+public class SxufeExchangeApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(SxufeExchangeApplication.class, args);
+    }
+
+}

+ 102 - 0
sxufe-exchange/src/main/java/com/qmth/sxufe/api/OpenApiController.java

@@ -0,0 +1,102 @@
+package com.qmth.sxufe.api;
+
+import com.qmth.boot.api.annotation.Aac;
+import com.qmth.boot.api.annotation.BOOL;
+import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.sxufe.utils.CasUtils;
+import com.qmth.sxufe.utils.Constants;
+import com.qmth.teachcloud.exchange.common.contant.SystemConstant;
+import com.qmth.teachcloud.exchange.common.service.AuthInfoService;
+import com.qmth.teachcloud.exchange.common.service.CommonService;
+import com.qmth.teachcloud.exchange.common.util.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import net.psctech.sso.filter.LoginFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+
+/**
+ * <p>
+ * 山西财经大学开放接口前端控制器
+ * </p>
+ */
+@Api(tags = "山西财经大学开放接口Controller")
+@RestController
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_OPEN)
+@Validated
+public class OpenApiController {
+    private static final Logger log = LoggerFactory.getLogger(OpenApiController.class);
+    private static final String schoolCode = "sxufe";//测试学校code,山西财经大学
+
+    @Resource
+    CommonService commonService;
+
+    @Resource
+    AuthInfoService authInfoService;
+
+    @Value("${cas.config.logoutUrl}")
+    String logoutUrl;
+
+    @ApiOperation(value = "cas鉴权接口")
+    @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
+    @RequestMapping(value = "/authentication", method = RequestMethod.GET)
+    @Aac(auth = BOOL.FALSE)
+    public void authentication(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        HttpSession session = request.getSession();
+        authInfoService.appHasExpired(schoolCode);
+
+        Object object = session.getAttribute(LoginFilter.CONST_CAS_USERNAME);
+        if (object != null) {
+            String targetUrl = CasUtils.getTargetUrl(request);
+            // 跳转到知学知考
+            response.sendRedirect(targetUrl);
+        } else {
+            // 返回登录页
+            String loginUrl = Constants.CAS_LOGIN_URL;
+            response.sendRedirect(loginUrl);
+        }
+    }
+
+    @ApiOperation(value = "cas鉴权退出接口")
+    @RequestMapping(value = "/authentication/logout", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
+    @Aac(auth = BOOL.FALSE)
+    public void logout(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        HttpSession session = request.getSession();
+        authInfoService.appHasExpired(schoolCode);
+        //注销本系统session
+        session.invalidate();
+        //跳转至注销后地址
+        response.sendRedirect(CasUtils.getLogoutUrl(request));
+    }
+
+    @ApiOperation(value = "跳转知学知考")
+    @RequestMapping(value = "/zxzk_login", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
+    @Aac(auth = BOOL.FALSE)
+    public void zxzkLogin(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        HttpSession session = request.getSession();
+        String userName = "";
+        Object object = session.getAttribute(LoginFilter.CONST_CAS_USERNAME);
+        if (object != null) {
+            userName = object.toString();
+            commonService.redirectLogic(userName, schoolCode, logoutUrl, null);
+        } else {
+            response.sendRedirect(Constants.CAS_LOGIN_URL);
+        }
+
+    }
+}

+ 88 - 0
sxufe-exchange/src/main/java/com/qmth/sxufe/aspect/ApiControllerAspect.java

@@ -0,0 +1,88 @@
+package com.qmth.sxufe.aspect;
+
+import com.qmth.boot.api.exception.ApiException;
+import com.qmth.teachcloud.exchange.common.contant.SystemConstant;
+import com.qmth.teachcloud.exchange.common.util.JacksonUtil;
+import com.qmth.teachcloud.exchange.common.util.ResultUtil;
+import com.qmth.teachcloud.exchange.common.util.ServletUtil;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.validation.BeanPropertyBindingResult;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Objects;
+import java.util.StringJoiner;
+
+/**
+ * @Description: api aspect
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/5/12
+ */
+@Aspect
+@Component
+public class ApiControllerAspect {
+    private final static Logger log = LoggerFactory.getLogger(ApiControllerAspect.class);
+
+    /**
+     * api切入点
+     */
+    @Pointcut("execution(public * com.qmth.sxufe.api.*.*(..))")
+    public void apiAspect() {
+    }
+
+    /**
+     * 后台环绕切入
+     *
+     * @param joinPoint
+     * @return
+     * @throws Throwable
+     */
+    @Around(value = "apiAspect()")
+    public Object aroundApiPoint(ProceedingJoinPoint joinPoint) throws Throwable {
+        long start = System.currentTimeMillis();
+        StringJoiner stringJoiner = new StringJoiner("");
+        try {
+            MethodSignature msig = (MethodSignature) joinPoint.getSignature();
+            String className = msig.getDeclaringTypeName();
+            String methodName = msig.getName();
+            Object[] args = joinPoint.getArgs();
+            String[] paramsName = msig.getParameterNames();
+            HttpServletRequest request = ServletUtil.getRequest();
+            stringJoiner.add("============请求地址============:").add(request.getServletPath()).add("\r\n");
+            stringJoiner.add("============类============:").add(className).add("\r\n");
+            stringJoiner.add("============方法============:").add(methodName).add("\r\n");
+            if (Objects.nonNull(args) && args.length > 0) {
+                for (int i = 0; i < args.length; i++) {
+                    if (Objects.nonNull(args[i]) && (args[i] instanceof HttpServletRequest || args[i] instanceof HttpServletResponse || args[i] instanceof CommonsMultipartFile || args[i] instanceof MultipartFile || args[i] instanceof BeanPropertyBindingResult)) {
+                        continue;
+                    } else {
+                        stringJoiner.add("参数key:").add(JacksonUtil.parseJson(paramsName[i])).add(",参数value:").add(JacksonUtil.parseJson(args[i])).add("\r\n");
+                    }
+                }
+            }
+            return joinPoint.proceed();
+        } catch (Exception e) {
+            log.error(SystemConstant.LOG_ERROR, e);
+            if (e instanceof ApiException) {
+                return ResultUtil.error((ApiException) e, e.getMessage());
+            } else {
+                return ResultUtil.error(e.getMessage());
+            }
+        } finally {
+            long end = System.currentTimeMillis();
+            stringJoiner.add("============耗时============:").add((end - start) / 1000 + "").add("秒");
+            log.info("request:{}", stringJoiner.toString());
+        }
+    }
+}

+ 38 - 0
sxufe-exchange/src/main/java/com/qmth/sxufe/filter/MyWebApplicationInitializer.java

@@ -0,0 +1,38 @@
+package com.qmth.sxufe.filter;
+
+import com.qmth.sxufe.utils.Constants;
+import edu.yale.its.tp.cas.client.filter.CASFilter;
+import org.springframework.boot.web.servlet.ServletContextInitializer;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+import javax.servlet.FilterConfig;
+import javax.servlet.FilterRegistration;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import java.util.HashMap;
+import java.util.Map;
+
+@Configuration
+public class MyWebApplicationInitializer implements ServletContextInitializer {
+
+    @Override
+    public void onStartup(ServletContext servletContext) {
+
+        FilterRegistration.Dynamic ssoFilter = servletContext.addFilter("SSO Filter", CASFilter.class);
+
+        Map<String, String> map = new HashMap<>();
+        map.put("edu.yale.its.tp.cas.client.filter.loginUrl", Constants.CAS_LOGIN_URL);
+        map.put("edu.yale.its.tp.cas.client.filter.validateUrl", Constants.CAS_VALIDATE_URL);
+        //接入的应用系统IP:Port,需要根据实际路径修改
+
+        WebApplicationContext cxt = WebApplicationContextUtils.getWebApplicationContext(servletContext);
+        String serverName = cxt.getEnvironment().getProperty("cas.filter.serverName");
+        map.put("edu.yale.its.tp.cas.client.filter.serverName", serverName);
+        map.put("edu.yale.its.tp.cas.client.filter.initContextClass", "net.psctech.sso.filter.LoginFilter");
+        ssoFilter.setInitParameters(map);
+
+        ssoFilter.addMappingForUrlPatterns(null, false, "/*");
+    }
+}

+ 31 - 0
sxufe-exchange/src/main/java/com/qmth/sxufe/start/StartRunning.java

@@ -0,0 +1,31 @@
+package com.qmth.sxufe.start;
+
+import com.qmth.teachcloud.exchange.common.service.AuthInfoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * @Description: 服务启动时初始化运行,哪个微服务模块需要则拿此模版去用
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/7/3
+ */
+@Component
+public class StartRunning implements CommandLineRunner {
+    private final static Logger log = LoggerFactory.getLogger(StartRunning.class);
+
+    @Resource
+    AuthInfoService authInfoService;
+
+    @Override
+    public void run(String... args) {
+        log.info("服务器启动时执行 start");
+        authInfoService.appInfoInit();
+        log.info("服务器启动时执行 end");
+    }
+}

+ 98 - 0
sxufe-exchange/src/main/java/com/qmth/sxufe/utils/CasUtils.java

@@ -0,0 +1,98 @@
+package com.qmth.sxufe.utils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+public class CasUtils {
+
+    public static String getBasePath(HttpServletRequest request) {
+        String scheme = request.getScheme();
+        String serverName = request.getServerName();
+        int serverPort = request.getServerPort();
+        String contextPath = request.getContextPath();
+
+        // 判断是否配置了显式端口
+        boolean explicit_port = Constants.CLIENT_SYSTEM_EXPLICIT_PORT != null
+                && !"".equals(Constants.CLIENT_SYSTEM_EXPLICIT_PORT);
+
+        if (explicit_port) {
+            try {
+                serverPort = Integer
+                        .parseInt(Constants.CLIENT_SYSTEM_EXPLICIT_PORT);
+            } catch (Exception e) {
+
+                // 异常时赋值,方便双方排查问题
+                serverPort = 19000;
+            }
+
+            String url = scheme + "://" + serverName + ":" + serverPort
+                    + contextPath + "/";
+            return url;
+
+        } else {
+            if ((serverPort == 80) || (serverPort == 443)) {
+
+                String url = scheme + "://" + serverName + contextPath
+                        + "/";
+                return url;
+            } else {
+                String url = scheme + "://" + serverName + ":" + serverPort
+                        + contextPath + "/";
+                return url;
+            }
+        }
+
+    }
+
+    /**
+     * 获取TargetUrl
+     */
+    public static String getTargetUrl(HttpServletRequest request) {
+        String basePath = getBasePath(request);
+
+        // 使用默认页面作为targetUrl
+        return basePath + Constants.DEF_TARGET_URI;
+    }
+
+//    public static String getURLEncodeServiceUrl(HttpServletRequest request)
+//            throws UnsupportedEncodingException {
+//
+//        // 编码成系统可识别的加密串
+//        String targetUrl = getTargetUrl(request);
+//        String base64TargetUrl = Base64Utils.encodeBase64Str(targetUrl);
+//
+//        String serviceUrlRoot = getBasePath(request)
+//                + Constants.SSO_LOGIN_URI;
+//
+//        String serviceUrl = serviceUrlRoot + "?" + Constants.TARGET_URL_KEY
+//                + "=" + Constants.BASE64_PREFIX + base64TargetUrl;
+//        return URLEncoder.encode(serviceUrl, Constants.UTF_8_STR);
+//    }
+
+    /**
+     * 获取Cas登录Url 登录成功后返回票据
+     */
+//    public static String getLoginUrl(HttpServletRequest request)
+//            throws UnsupportedEncodingException {
+//        String encodeServiceUrl = getURLEncodeServiceUrl(request);
+//
+//        return Constants.CAS_LOGIN_URL + "?" + Constants.SERVICE_KEY + "="
+//                + encodeServiceUrl;
+//    }
+
+    /**
+     * 获取登出地址
+     */
+    public static String getLogoutUrl(HttpServletRequest request)
+            throws UnsupportedEncodingException {
+        // 获取本次请求的根Path
+        String loginUrlRoot = getBasePath(request)
+                + Constants.SSO_LOGIN_URI;
+        String encodeLoginUrlRoot = URLEncoder.encode(loginUrlRoot,
+                Constants.UTF_8_STR);
+        return Constants.CAS_LOGOUT_URL + "?" + Constants.SERVICE_KEY + "="
+                + encodeLoginUrlRoot;
+    }
+
+}

+ 37 - 0
sxufe-exchange/src/main/java/com/qmth/sxufe/utils/Constants.java

@@ -0,0 +1,37 @@
+package com.qmth.sxufe.utils;
+
+import java.nio.charset.Charset;
+
+public interface Constants {
+
+    // CAS根地址
+    String CAS_BASE_PATH = "http://ca.sxufe.edu.cn/zfca";
+
+    // 业务系统需要显式使用的端口配置,包括80端口,如果不需要配置显式端口,则配置空字符串""即可
+    String CLIENT_SYSTEM_EXPLICIT_PORT = "";
+
+    // CAS Server验证成功后需跳转客户端Url的Key
+    String SERVICE_KEY = "service";
+
+    // CAS票据验证地址
+    String CAS_VALIDATE_URL = CAS_BASE_PATH + "/serviceValidate";
+
+    // CAS登录地址
+    String CAS_LOGIN_URL = CAS_BASE_PATH + "/login";
+
+    // CAS注销地址
+    String CAS_LOGOUT_URL = CAS_BASE_PATH + "/logout";
+
+    //登录成功默认跳转地址
+    String DEF_TARGET_URI = "/api/open/zxzk_login";
+
+    // 业务系统认证集成改造之后的登录URI
+    String SSO_LOGIN_URI = "/api/open/authentication";
+
+    // 默认编码字符串格式
+    String UTF_8_STR = "UTF-8";
+
+    // 默认编码
+    Charset UTF_8 = Charset.forName(UTF_8_STR);
+
+}

+ 65 - 0
sxufe-exchange/src/main/resources/application.properties

@@ -0,0 +1,65 @@
+server.port=7113
+#tomcat\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u9ED8\u8BA4\u4E3A200
+server.tomcat.threads.max=2500
+#tomcat\u6700\u5927\u8FDE\u63A5\u6570
+server.tomcat.max-connections=2500
+#tomcat\u7684URI\u7F16\u7801
+server.tomcat.uri-encoding=UTF-8
+
+server.tomcat.remoteip.protocol-header=X-Forwarded-Proto
+server.tomcat.remoteip.remote-ip-header=X-FORWARDED-FOR
+
+#\u9879\u76EE\u540D\u79F0
+spring.application.name=cdut-exchange
+
+#\u6570\u636E\u6E90\u914D\u7F6E
+db.host=localhost
+db.port=3306
+db.name=exchange-api-1.0.0
+db.username=root
+db.password=12345678
+
+#mysql\u914D\u7F6E
+com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
+com.qmth.datasource.username=${db.username}
+com.qmth.datasource.password=${db.password}
+com.qmth.mybatis.log-level=debug
+
+com.qmth.fss.public.config=../static/
+com.qmth.fss.public.server=/Users/king/git
+#com.qmth.fss.public.server=/static/
+com.qmth.fss.private.config=../static/
+com.qmth.fss.private.server=/Users/king/git
+#com.qmth.fss.private.server=/static/
+spring.resources.static-locations=file:${com.qmth.fss.private.server},classpath:/META-INF/resources/,classpath:/resources/
+
+#com.qmth.api.uri-prefix=/aaa
+#\u7EDF\u8BA1\u9875\u9762\u914D\u7F6E
+com.qmth.api.metrics-endpoint=/metrics-count
+com.qmth.api.global-auth=true
+#com.qmth.api.global-strict=false
+#com.qmth.api.global-rate-limit=1/5s
+
+#token\u8D85\u65F6\u914D\u7F6E
+com.qmth.auth.time-max-ahead=1m
+com.qmth.auth.time-max-delay=5m
+
+#\u7F13\u5B58\u65F6\u95F4
+com.qmth.cache.expire-after-write=8h
+
+#\u65E5\u671F\u683C\u5F0F\u5316
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+
+#\u65E5\u5FD7\u914D\u7F6E
+com.qmth.logging.root-level=info
+com.qmth.logging.file-path=/Users/king/Downloads/sxufe-exchange.log
+
+#com.qmth.solar.access-key=274f823e5f59410f8b3bb6edcd8e2b6e
+#com.qmth.solar.access-secret=y7AO6W0TOdTF8HpWBwGHbp3wfIHsmUKr
+com.qmth.solar.license=C:\\Users\\xf520\\Desktop\\exchange-cdut.lic
+
+cas.filter.serverName=192.168.1.247:8181
+
+cas.config.teachcloudPrintLoginUrl=https://cdut.teach-cloud.com/#/login-open
+cas.config.logoutUrl=https://exam.cdut.edu.cn/api/open/authentication/logout

BIN
sxufe-exchange/src/main/resources/lib/cas-client-core-3.1.12.jar


BIN
sxufe-exchange/src/main/resources/lib/sso-client-java-7.0.8.jar


+ 13 - 0
sxufe-exchange/src/test/java/com/qmth/sxufe/SxufeExchangeApplicationTests.java

@@ -0,0 +1,13 @@
+package com.qmth.sxufe;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class SxufeExchangeApplicationTests {
+
+    @Test
+    void contextLoads() {
+    }
+
+}