Spring Security on a non Spring Web app

spring boot security
spring boot security tutorial step by step
how spring security works in spring boot
spring security configuration
spring boot security rest
spring-boot-starter-security
spring security architecture
spring boot security filter

Am trying to use Spring Security but all the tutorial I've found use the Spring framework for web application:

So my Question is:

Is it possible to use the Spring Security in a simple java web application without using the Spring Framework or are they linked together?

UPDATE

Well in fact, I've make a simple Java web Application using JPA - JSP on netbeans. So now I've decided to add some security. After some search, I found Shiro, Spring Security, And JAAS. So if I use maven, I could download the Spring Security dependencies without using the Spring famework, right?

UPDATE 2

Here is the XML file:

    <?xml version="1.0" encoding="UTF-8"?>

    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
            version="3.0">
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>

            <listener>
                <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
            </listener>

            <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                    /WEB-INF/MyDispatcherServlet-servlet.xml
                </param-value>
            </context-param>

            <servlet>
                <servlet-name>MyDispatcherServlet</servlet-name>
                <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            </servlet>

            <servlet-mapping>
                <servlet-name>MyDispatcherServlet</servlet-name>
                <url-pattern>*.go</url-pattern>
            </servlet-mapping>

            <filter>
                <filter-name>springSecurityFilterChain</filter-name>
                <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
            </filter>

            <filter-mapping>
                <filter-name>springSecurityFilterChain</filter-name>
                <url-pattern>/*</url-pattern>
            </filter-mapping>

    </web-app>

This is the the server log error when I run the app:

        GRAVE: Class [ Lorg/apache/commons/logging/Log; ] not found. Error while loading [ class org.springframework.security.access.annotation.Jsr250MethodSecurityMetadataSource ]
        ATTENTION: Error in annotation processing: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
        GRAVE: Class [ Lorg/apache/commons/logging/Log; ] not found. Error while loading [ class org.springframework.security.access.annotation.Jsr250MethodSecurityMetadataSource ]
        ATTENTION: Error in annotation processing: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
        GRAVE: Class [ Lorg/apache/commons/logging/Log; ] not found. Error while loading [ class org.springframework.remoting.jaxws.SimpleHttpServerJaxWsServiceExporter ]
        ATTENTION: Error in annotation processing: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
        GRAVE: PWC1306: Startup of context /SpringTestApp_mvn5 failed due to previous errors
        GRAVE: PWC1305: Exception during cleanup after start failed
        org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started
                at org.apache.catalina.session.StandardManager.stop(StandardManager.java:892)
                at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5456)
                at com.sun.enterprise.web.WebModule.stop(WebModule.java:530)
                at org.apache.catalina.core.StandardContext.start(StandardContext.java:5284)
                at com.sun.enterprise.web.WebModule.start(WebModule.java:499)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1947)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1619)
                at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)
                at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
                at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
                at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
                at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
                at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
                at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
                at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                at java.lang.Thread.run(Thread.java:619)

        GRAVE: ContainerBase.addChild: start: 
        org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
                at org.apache.catalina.core.StandardContext.start(StandardContext.java:5289)
                at com.sun.enterprise.web.WebModule.start(WebModule.java:499)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1947)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1619)
                at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)
                at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
                at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
                at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
                at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
                at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
                at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
                at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                at java.lang.Thread.run(Thread.java:619)
        Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:191)
                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
                at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4664)
                at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:535)
                at org.apache.catalina.core.StandardContext.start(StandardContext.java:5266)
                ... 38 more
        Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
                at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:959)
                at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1430)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                ... 43 more

        ATTENTION: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:932)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1947)
                at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1619)
                at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)
                at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
                at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
                at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
                at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
                at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
                at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
                at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                at java.lang.Thread.run(Thread.java:619)

        GRAVE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
        java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
                at com.sun.enterprise.web.WebApplication.start(WebApplication.java:117)
                at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
                at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
                at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
                at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
                at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
                at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
                at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                at java.lang.Thread.run(Thread.java:619)

        GRAVE: Exception while loading the app
        java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
                at com.sun.enterprise.web.WebApplication.start(WebApplication.java:117)
                at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
                at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
                at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
                at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
                at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
                at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
                at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                at java.lang.Thread.run(Thread.java:619)

The inclusion of spring in your application includes the spring security implementations in it(which is a ultimately a java class implementation). I don't think there is a benefit in NOT including spring framework in your application, but to include ONLY its security implementations.

Getting Started, You will build a Spring MVC application that secures the page with a login form the Application” and run the application without having to log in to anything. The Spring versions required by Spring Security is published on the Spring Security web site: Spring Security 3.2.0.M1 is the latest development release (requires Java 1.5+ and Spring 3.2.0+) Spring Security 3.1.4.RELEASE is the latest production release (requires Java 1.5+ and Spring 3.0.7+)

I think it is not possible as Spring Security is built on top of Spring framework.

Though you can configure the maven to download Spring Security dependencies only , your project will not be executed succesfully and NoClassDefFoundError exception will thrown out at some points because the source codes of the Spring Security uses many classes and features from the Spring framework .

If you want to use the security framework that does not depend on spring framework , please check out Apache Shiro

Topical Guide, It is not, however, tied to Spring MVC or the rest of the Spring web stack, so it can be used in any servlet application, for instance one  I am using Spring Boot 2.3.0.RELEASE for a non web (batch & command line) application which uses spring-cloud-starter-openfeign to do a HTTP outbound service. My outbound call uses OAuth2 with

Securing Jakarta EE with Spring Security, Learn how to secure a Jakarta EE web application with Spring Security. prototyping when a full persistence mechanism is not necessary. The SpringSecurityWebAppConfig class is a way to use Java code to configure how Spring Boot handles web app security. Here, we use the HttpSecurity object to remove authorization from all endpoints.

you can use maven-aspectj-plugin for this. When a class annotated with @Configurable annotation, this plugin can inject dependencies at compile time.@Configurable is a Spring annotation that allows dependencies to be injected into objects instantiated external to Spring. You dont have to make all your project based on spring

Spring Security to secure a web application, The Spring Boot framework contains a module called Spring Security. It helps to secure web application resources from unauthorized access with for which the security is required, and other for which security is not required. Before we apply security to a web application, let's create a very simple web application. Then we secure it with Spring Security in the next section. The web application includes two simple views: a home page and a "Hello World" page.

When using Spring Security without Spring Boot, the preferred way is to leverage Spring Security’s BOM to ensure a consistent version of Spring Security is used throughout the entire project. Reference here. And you can initiliaze your app using SecurityWebApplicationInitializer.

Easy way to learn Spring Security, Integrate Spring Security in Spring MVC or Non-Spring Boot application. To integrate Spring security with a Spring MVC web application just  Spring Security’s web infrastructure is based entirely on standard servlet filters. It doesn’t use servlets or any other servlet-based frameworks (such as Spring MVC) internally, so it has no strong links to any particular web technology.

Spring Security: Authentication and Authorization In-Depth, Before you become a Spring Security Guru, you need to understand First off, if you are running a typical (web) application, you need your Last but not least, let's have a look at Servlet Filters. The real objective of Spring Boot is not to write very basic programs like hello world. Spring Boot is an overkill for such things. The real benefit of Spring boot is when you create large web or standalone apps.

Use Spring Security in Your Spring Boot App, Essentially, Spring Security is a library of security functions you can add to your Spring, Spring MVC, Spring Boot, RESTful API, or single-page  You do that by configuring Spring Security in the application. If Spring Security is on the classpath, Spring Boot automatically secures all HTTP endpoints with “basic” authentication. However, you can further customize the security settings. The first thing you need to do is add Spring Security to the classpath.

How to Secure a Web Application using Spring Security? – Web Age , It can even be integrated with non-Spring web frameworks such as Struts, Seam, and ColdFusion. Single Sign On (SSO) can be integrated  Summary. Spring Security is a very popular project in the Spring Framework family of projects. When you need to secure content in a Spring Boot web application, Spring Security is a natural ‘go to’ tool to use. In this post, I’ve only scratched the surface of the capabilities of Spring Security.

Comments
  • Well in fact, I've make a simple Java web Application using JPA - JSP on netbeans. So now I've decided to add some security. After some search, I found Shiro, Spring Security, And JAAS. So if I use maven, I could download the Spring Security dependencies without using the Spring famework, right?
  • Yes. But ultimately you need to include your configurations for including the spring security in the xml file to make it useful to your app. Maven can just provide you. I don't think you can use it without configuring it in xml. If you have brought in successfully, please post your answer :)
  • It's not right, using maven to download Spring Security, will automatically download Spring Security dependencies, including the Spring Framework, as documented in the manual, static.springsource.org/spring-security/site/docs/3.1.x/…, and in the maven pom files, repo1.maven.org/maven2/org/springframework/security/….
  • @Asme: The error seems to be wrt logger. Please check if your jar files are included properly.
  • Hello, Ive try Apache Shiro (that I find easier by the way), but got some error when trying to add functionality, I'll open another post for it right now.