Prerequisites

Spring Security 要求使用 Java 8 或更高版本的运行时环境。

Spring Security requires a Java 8 or higher Runtime Environment.

由于 Spring Security 旨在以自包含的方式运行,因此你不必在 Java 运行时环境中放置任何特殊配置文件。特别是,你无需配置特殊的 Java 身份验证和授权服务 (JAAS) 策略文件,也不必将 Spring Security 放入常见的类路径位置。

As Spring Security aims to operate in a self-contained manner, you do not need to place any special configuration files in your Java Runtime Environment. In particular, you need not configure a special Java Authentication and Authorization Service (JAAS) policy file or place Spring Security into common classpath locations.

同样,如果你使用 EJB 容器或 Servlet 容器,则不必在任何位置放置特殊的配置文件,也不必将 Spring Security 包含在服务器类加载器中。所有必需的文件都包含在你的应用程序中。

Similarly, if you use an EJB Container or Servlet Container, you need not put any special configuration files anywhere nor include Spring Security in a server classloader. All the required files are contained within your application.

此设计提供了最大的部署时间灵活性,你可以在不同的系统之间复制目标工件(JAR、WAR 或 EAR),然后立即运行。

This design offers maximum deployment time flexibility, as you can copy your target artifact (be it a JAR, WAR, or EAR) from one system to another and it immediately works.