• 大小: 25KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-04
  • 语言: 其他
  • 标签: Cas  Security  SpringBoot  

资源简介

SpringBoot+Security+Cas 的一个Demo,想学习的可以参考下

资源截图

代码片段和文件信息

package com.chengli.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class MainConfig {
public static void main(String[] args) {
SpringApplication.run(MainConfig.class args);
}

@RequestMapping(“/“)
public String index() {
return “访问了首页哦“;
}

@RequestMapping(“/hello“)
public String hello() {
return “不验证哦“;
}

@PreAuthorize(“hasAuthority(‘TEST‘)“)//有TEST权限的才能访问
@RequestMapping(“/security“)
public String security() {
return “hel

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\
     文件          72  2017-08-03 03:25  spring-boot-security-cas-master\README.md
     文件        2125  2017-08-03 03:25  spring-boot-security-cas-master\pom.xml
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\
     文件        1164  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\MainConfig.java
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\custom\
     文件         566  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\custom\AuthorityInfo.java
     文件        1426  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\custom\CustomUserDetailsService.java
     文件        2558  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\custom\UserInfo.java
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\properties\
     文件        1688  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\properties\CasProperties.java
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\security\
     文件        6467  2017-08-03 03:25  spring-boot-security-cas-master\src\main\java\com\chengli\springboot\security\SecurityConfig.java
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\src\main\resources\
     文件         408  2017-08-03 03:25  spring-boot-security-cas-master\src\main\resources\application.properties
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\target\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\meta-INF\
     文件         327  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\meta-INF\MANIFEST.MF
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\meta-INF\maven\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\meta-INF\maven\com.chengli\
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\meta-INF\maven\com.chengli\springboot-security-cas\
     文件         279  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\meta-INF\maven\com.chengli\springboot-security-cas\pom.properties
     文件        2125  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\meta-INF\maven\com.chengli\springboot-security-cas\pom.xml
     文件         408  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\application.properties
     目录           0  2017-08-03 03:25  spring-boot-security-cas-master\target\classes\com\
............此处省略20个文件信息

评论

共有 条评论