springsecurity 初始化
时间: 2023-09-11 13:08:33 浏览: 112
spring security初步搭建
Spring Security 的初始化是通过注解@EnableWebSecurity来完成的。这个注解是初始化 Spring Security 的入口,它会导入WebSecurityConfiguration、SpringWebMvcImportSelector和OAuth2ImportSelector等类,同时还会启用全局的身份验证。在使用这个注解时,可以设置debug参数来控制是否启用调试支持。
在Spring Security的依赖中,主要的jar包有spring-security-core.jar、spring-security-web.jar、spring-security-config.jar和spring-security-taglibs.jar。其中,spring-security-core.jar是核心包,其他的jar包提供了web工程的过滤器、Web安全基础结构代码、解析xml配置文件和动态标签库等功能。所以,要使用Spring Security,需要引入这些jar包。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [二、初始化Spring Security](https://blog.csdn.net/btt2013/article/details/119767212)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [常用的框架技术-09 Spring Security 的源代码和初始化项目](https://download.csdn.net/download/tengliangchang/87134625)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Spring Security 初始化流程详解](https://blog.csdn.net/weixin_34240657/article/details/91397465)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文