首页 > 其他分享 >Getting Spring Security

Getting Spring Security

时间:2024-07-19 11:57:10浏览次数:8  
标签:Getting Spring Maven pom spring Security starter

This section describes how to get the Spring Security binaries. See Source Code for how to obtain the source code.

本节介绍如何获取 Spring Security 二进制文件。有关如何获取源代码,请参阅源代码。

Release Numbering 版本编号

Spring Security versions are formatted as MAJOR.MINOR.PATCH such that:

  • MAJOR (主要) versions may contain breaking changes. Typically, these are done to provide improved security to match modern security practices.

  • MINOR (次要) versions contain enhancements but are considered passive updates.

  • PATCH (补丁) level should be perfectly compatible, forwards and backwards, with the possible exception of changes that fix bugs.

Usage with Maven

As most open source projects, Spring Security deploys its dependencies as Maven artifacts. The topics in this section describe how to consume Spring Security when using Maven.  

与大多数开源项目一样,Spring Security 将其依赖项部署为 Maven 工件。本节中的主题介绍如何在使用 Maven 时使用 Spring Security。

Spring Boot with Maven

Spring Boot provides a spring-boot-starter-security starter that aggregates Spring Security-related dependencies. The simplest and preferred way to use the starter is to use Spring Initializr by using an IDE integration in (Eclipse or IntelliJNetBeans) or through start.spring.io. Alternatively, you can manually add the starter, as the following example shows:

Spring Boot 提供了一个 spring-boot-starter-security 启动器,用于聚合与 Spring Security 相关的依赖项。使用启动器的最简单和首选方法是通过使用 IDE 集成(Eclipse 或 IntelliJ、NetBeans)或通过 start.spring.io 来使用 Spring Initializr。或者,您可以手动添加启动器,如以下示例所示:

pom.xml

<properties>
    <spring-security.version>6.2.4</spring-security.version>
</properties>

<dependencies>
    <!-- ... other dependency elements ... -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
</dependencies>

Since Spring Boot provides a Maven BOM to manage dependency versions, you do not need to specify a version. If you wish to override the Spring Security version, you can do so by providing a Maven property:

由于 Spring Boot 提供了 Maven BOM 来管理依赖版本,因此无需指定版本。如果要覆盖 Spring Security 版本,可以通过提供 Maven 属性来实现:

pom.xml

<properties>
    <!-- ... -->
    <spring-security.version>6.3.1</spring-security.version>
</properties>

If you use additional features (such as LDAP, OAuth 2, and others), you need to also include the appropriate Project Modules and Dependencies.

如果使用其他功能(如 LDAP、OAuth 2 等),则还需要包含相应的项目模块和依赖项。

Maven Repositories

All GA releases (that is, versions ending in .RELEASE) are deployed to Maven Central, so you need not declare additional Maven repositories in your pom.

所有 GA 版本(即以 . 结尾的版本)RELEASE) 部署到 Maven Central,因此您无需在 pom 中声明其他 Maven 存储库。

If you use a SNAPSHOT version, you need to ensure that you have the Spring Snapshot repository defined:

如果使用 SNAPSHOT 版本,则需要确保定义了 Spring Snapshot 存储库:

pom.xml

<repositories>
    <!-- ... possibly other repository elements ... -->
    <repository>
        <id>spring-snapshot</id>
        <name>Spring Snapshot Repository</name>
        <url>https://repo.spring.io/snapshot</url>
    </repository>
</repositories>

If you use a milestone or release candidate version, you need to ensure that you have the Spring Milestone repository defined, as the following example shows:

如果使用里程碑或候选发布版本,则需要确保定义了 Spring Milestone 存储库,如以下示例所示:

pom.xml

<repositories>
    <!-- ... possibly other repository elements ... -->
    <repository>
        <id>spring-milestone</id>
        <name>Spring Milestone Repository</name>
        <url>https://repo.spring.io/milestone</url>
    </repository>
</repositories>

 

 

 

 

 

标签:Getting,Spring,Maven,pom,spring,Security,starter
From: https://www.cnblogs.com/neverheartache/p/18311217

相关文章

  • 【Spring -- 08 Scope 】
    在Spring和SpringBoot程序中,不同的作用域(Scope)管理Bean的创建和销毁周期。以下是对每种作用域的详细解释以及在单例(singleton)中注入其他作用域Bean时的解决方法:作用域(Scope)类型singleton描述:整个应用程序中只有一个实例,默认的作用域。生命周期:容器启动时创建(如果......
  • 【Spring -- 09 AOP 实现方式】
    在JavaSpring框架中,AOP(面向切面编程)的代理实现主要通过以下几种方式:JDK动态代理:JDK动态代理是基于Java的 java.lang.reflect.Proxy 类实现的.当需要代理的目标对象实现了一个或多个接口时,Spring会选择使用JDK动态代理.JDK动态代理的工作原理如下:......
  • 基于java+springboot+vue实现的学生选课系统(文末源码+Lw)129
     系统角色:学生、教师、管理员系统功能:管理员管理专业,教师,学生,课程,查看学生选课以及学生成绩信息。教师查询学生,查询课程,审核学生选课信息,为学生学习的课程进行成绩打分学生参与课程选课,查询选课信息,查询已选课程的成绩信息。技术栈:开发语言:JavaJDK版本:JDK8前端技......
  • 基于java+springboot+vue实现的中小企业人事管理系统(文末源码+Lw)128
     基于SpringBoot+Vue的实现的中小企业人事管理系统(源码+数据库+万字Lun文+流程图+ER图+结构图+ppt+演示视频+软件包)系统角色:员工、管理员系统功能:管理员登录进入中小企业人事管理系统可以查看首页、个人中心、员工管理、部门信息管理、职位信息管理、福利信息管理、培......
  • 基于java+springboot+vue实现的实验室管理系统(文末源码+Lw)127
     基于SpringBoot+Vue的实现的实验室管理系统(源码+数据库+万字Lun文+流程图+ER图+结构图+演示视频+软件包)系统功能:实验室管理系统管理员功能有个人中心,学生管理,教师管理,公告信息管理,知识库管理,实验课程管理,实验室信息管理,实验室预约管理,实验设备管理,采购记录管理,维修记录管......
  • Spring AI(大模型工具Ollama介绍)
    接上篇:SpringAI(多模态) 1、大模型工具Ollama介绍官网:https://ollama.com/2、大模型工具Ollama下载官网下载地址:https://ollama.com/download3、大模型工具Ollama安装4、大模型工具Ollama运行5、大模型工具Ollama默认端口netstat-ano|findstr11434 ......
  • springboot~mybatis-pagehelper原理与使用
    原理PageHelper是一个用于MyBatis的分页插件,pagehelper-spring-boot-starter是其在SpringBoot中的集成组件。下面简要介绍PageHelper的分页原理:PageHelper的分页原理拦截器机制:PageHelper通过MyBatis的拦截器机制实现分页功能。它会在SQL执行前拦截并修改SQL语句,添加分页相......
  • 3分钟带你搞定Spring Boot中Schedule
    一、背景介绍在实际的业务开发过程中,我们经常会需要定时任务来帮助我们完成一些工作,例如每天早上6点生成销售报表、每晚23点清理脏数据等等。如果你当前使用的是SpringBoot来开发项目,那么完成这些任务会非常容易!SpringBoot默认已经帮我们完成了相关定时任务组件......
  • 3分钟带你搞定Spring Boot中Schedule
    一、背景介绍在实际的业务开发过程中,我们经常会需要定时任务来帮助我们完成一些工作,例如每天早上6点生成销售报表、每晚23点清理脏数据等等。如果你当前使用的是SpringBoot来开发项目,那么完成这些任务会非常容易!SpringBoot默认已经帮我们完成了相关定时任务组件的配置,......
  • springboot+vue+mybatis销售评价系统+PPT+论文+讲解+售后
    随着科学技术的飞速发展,社会的方方面面、各行各业都在努力与现代的先进技术接轨,通过科技手段来提高自身的优势,销售评价系统当然也不能排除在外。销售评价系统是以实际运用为开发背景,运用软件工程开发方法,采用Java技术构建的一个管理系统。整个开发过程首先对软件系统进行需求分......