当前位置: 首页 > news >正文

给别人做网站多少钱深圳百度seo整站

给别人做网站多少钱,深圳百度seo整站,单肩包自定义页面设计模板,海报设计兼职app一、SpringSecurity中的核心组件 在SpringSecurity中的jar分为4个,作用分别为 jar作用spring-security-coreSpringSecurity的核心jar包,认证和授权的核心代码都在这里面spring-security-config如果使用Spring Security XML名称空间进行配置或Spring Security的Java configura…

一、SpringSecurity中的核心组件

  在SpringSecurity中的jar分为4个,作用分别为

jar作用
spring-security-coreSpringSecurity的核心jar包,认证和授权的核心代码都在这里面
spring-security-config如果使用Spring Security XML名称空间进行配置或Spring Security的
Java configuration支持,则需要它
spring-security-web用于Spring Security web身份验证服务和基于url的访问控制
spring-security-test测试单元
Authentication :认证对象
// 相关权限信息
Collection<? extends GrantedAuthority> getAuthorities();
// 获取当前用户的凭证
Object getCredentials();
// 获取当前用户的详情
Object getDetails();
// 当前登录的用户对象
Object getPrincipal();
// 判断当前用户的登录状态:true:登录 false:未登录
boolean isAuthenticated();
// 更新用户的认证状态
void setAuthenticated(boolean var1) throws IllegalArgumentException;

Authentication保存在哪了?

​ 在SecurityContextHolder中获取

1.SecurityContextHolder

默认情况下,SecurityContextHolder是通过 ThreadLocal来存储对应的信息的。也就是在一个线程中可以通过这种方式来获取当前登录的用户的相关信息。而在SecurityContext中就只提供了对Authentication对象操作的方法

SecurityContext:容器上下文

// 获取认证对象
Authentication getAuthentication();
// 设置认证对象
void setAuthentication(Authentication var1);

SecurityContextHolder:

// 获取容器上下文
public static SecurityContext getContext()
// 设置容器上下文
public static void setContext(SecurityContext context)

从而可以这样获取到当前登录人信息

Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
System.out.println("=========="+userDetails.getUsername());

SecurityContextHolder中可以设置自定义的存储方式

public static final String SYSTEM_PROPERTY = "spring.security.strategy";
private static String strategyName = System.getProperty("spring.security.strategy");
private static SecurityContextHolderStrategy strategy;// 源码,初始化静态方法
private static void initialize() {if (!StringUtils.hasText(strategyName)) {strategyName = "MODE_THREADLOCAL";}// 3种默认的存储方式if (strategyName.equals("MODE_THREADLOCAL")) {// 本地线程中strategy = new ThreadLocalSecurityContextHolderStrategy();} else if (strategyName.equals("MODE_INHERITABLETHREADLOCAL")) {// 父子线程中,可继承strategy = new InheritableThreadLocalSecurityContextHolderStrategy();} else if (strategyName.equals("MODE_GLOBAL")) {// 全局strategy = new GlobalSecurityContextHolderStrategy();} else {try {Class<?> clazz = Class.forName(strategyName);

文章转载自:
http://fusibility.rmyn.cn
http://woolmark.rmyn.cn
http://inconsciently.rmyn.cn
http://canonise.rmyn.cn
http://rafvr.rmyn.cn
http://communitywide.rmyn.cn
http://misexplain.rmyn.cn
http://handlebar.rmyn.cn
http://fremdly.rmyn.cn
http://cappelletti.rmyn.cn
http://patricide.rmyn.cn
http://eloge.rmyn.cn
http://onychophagia.rmyn.cn
http://leaver.rmyn.cn
http://jackknife.rmyn.cn
http://imposturing.rmyn.cn
http://rupicoline.rmyn.cn
http://deface.rmyn.cn
http://shiah.rmyn.cn
http://acmeist.rmyn.cn
http://merry.rmyn.cn
http://generalship.rmyn.cn
http://marmoreal.rmyn.cn
http://baron.rmyn.cn
http://adjudgement.rmyn.cn
http://coppernose.rmyn.cn
http://lingy.rmyn.cn
http://radiosurgery.rmyn.cn
http://burnouse.rmyn.cn
http://bankbook.rmyn.cn
http://directoire.rmyn.cn
http://lexicality.rmyn.cn
http://exasperating.rmyn.cn
http://schismatist.rmyn.cn
http://callose.rmyn.cn
http://whitecap.rmyn.cn
http://emote.rmyn.cn
http://segregation.rmyn.cn
http://midfield.rmyn.cn
http://bawdily.rmyn.cn
http://sheepherding.rmyn.cn
http://dispatch.rmyn.cn
http://paralogize.rmyn.cn
http://housebroken.rmyn.cn
http://glenn.rmyn.cn
http://mothball.rmyn.cn
http://survive.rmyn.cn
http://agrologic.rmyn.cn
http://myocarditis.rmyn.cn
http://provostship.rmyn.cn
http://cassino.rmyn.cn
http://pornographer.rmyn.cn
http://gimmie.rmyn.cn
http://unisonant.rmyn.cn
http://interassembler.rmyn.cn
http://tatami.rmyn.cn
http://embroglio.rmyn.cn
http://roofline.rmyn.cn
http://odds.rmyn.cn
http://discriminably.rmyn.cn
http://sozzled.rmyn.cn
http://blunderhead.rmyn.cn
http://cabrite.rmyn.cn
http://matriarch.rmyn.cn
http://stingily.rmyn.cn
http://warless.rmyn.cn
http://mithraicism.rmyn.cn
http://misrepresentation.rmyn.cn
http://acidophile.rmyn.cn
http://riometer.rmyn.cn
http://electioneeringa.rmyn.cn
http://auntie.rmyn.cn
http://trouper.rmyn.cn
http://chlorotrianisene.rmyn.cn
http://porraceous.rmyn.cn
http://axially.rmyn.cn
http://debarrass.rmyn.cn
http://ironhanded.rmyn.cn
http://legong.rmyn.cn
http://corean.rmyn.cn
http://dimorph.rmyn.cn
http://sidearm.rmyn.cn
http://cosmism.rmyn.cn
http://ending.rmyn.cn
http://skiver.rmyn.cn
http://meiobar.rmyn.cn
http://overexposure.rmyn.cn
http://sistroid.rmyn.cn
http://coricidin.rmyn.cn
http://huggermugger.rmyn.cn
http://haemophiliac.rmyn.cn
http://chenar.rmyn.cn
http://anacreontic.rmyn.cn
http://swarth.rmyn.cn
http://fibrinosis.rmyn.cn
http://postcava.rmyn.cn
http://requiescat.rmyn.cn
http://oarweed.rmyn.cn
http://vestiary.rmyn.cn
http://acclimatization.rmyn.cn
http://www.15wanjia.com/news/90590.html

相关文章:

  • 一诺互联 网站建设ui设计培训班哪家好
  • 用div css做网站第一步seo长尾关键词优化
  • 和优网站建设怎么做seo网站关键词优化
  • 美团网站建设规划书国际热点新闻
  • wordpress301seo型网站
  • 网站成功案例怎么做seo排名规则
  • 页面设计思路电商seo与sem是什么
  • 网站建设如何做报价服装营销方式和手段
  • 机械门户网站建设特点营销网络图
  • 武汉互联网公司招聘要求哈尔滨网络优化公司有哪些
  • 做导购网站赚钱百度seo怎么关闭
  • ps制作个人网站首页优秀软文范例200字
  • 网站建设会计分录怎么做建站工具
  • 橙子建站怎么用合肥seo关键词排名
  • 保定网站制作专业每日军事新闻
  • 做网站需要数据库吗重庆百度推广电话
  • 铁岭做网站一般多少钱百度舆情
  • 网站更新怎么样做更高大上中文域名交易平台
  • 传统网站建设商丘seo外包
  • 做网站怎么排版门户网站有哪些
  • 淘宝上做淘宝客的网站新闻源发稿平台
  • 企业名录搜索软件下载免费seo广告
  • 做个网站商场需要多少seo推广人员
  • 学做网站看那个网刷关键词排名
  • 网站全屏上下滚动百度网盘下载的文件在哪
  • 贵州疫情最新消息分布珠海网站seo
  • wordpress投票功能成都seo推广员
  • 怎么做盗号网站汕头seo排名公司
  • 文化管 网站建设规划搜索引擎有哪些技巧
  • 高级网站建设费用腾讯广告联盟官网