Skip to content

Commit

Permalink
[JAVA-40697] (eugenp#18011)
Browse files Browse the repository at this point in the history
* [JAVA-40697] Moved article "Introduction to Spring Security Taglibs" from spring-boot-security to spring-boot-security-2

* [JAVA-40697] Moved article "Spring @EnableWebSecurity vs. @EnableGlobalMethodSecurity" from spring-boot-security to spring-boot-security-2

* [JAVA-40697] Moved article "Guide to @CurrentSecurityContext in Spring Security" from spring-boot-security to spring-boot-security-2
  • Loading branch information
panos-kakos authored Nov 22, 2024
1 parent fbe70fd commit 5104d0d
Show file tree
Hide file tree
Showing 22 changed files with 48 additions and 9 deletions.
3 changes: 3 additions & 0 deletions spring-boot-modules/spring-boot-security-2/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
## Relevant Articles
- [Difference Between permitAll() and anonymous() in Spring Security](https://www.baeldung.com/spring-security-permitall-vs-anonymous)
- [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs)
- [Spring @EnableWebSecurity vs. @EnableGlobalMethodSecurity](https://www.baeldung.com/spring-enablewebsecurity-vs-enableglobalmethodsecurity)
- [Guide to @CurrentSecurityContext in Spring Security](https://www.baeldung.com/spring-currentsecuritycontext)
21 changes: 21 additions & 0 deletions spring-boot-modules/spring-boot-security-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<!-- security taglib -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
</dependency>
<!-- JSTL -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>${jstl.api.version}</version>
</dependency>
</dependencies>

<build>
Expand All @@ -48,4 +64,9 @@
</plugins>
</build>

<properties>
<start-class>com.baeldung.permitallanonymous.SecuredEcommerceApplication</start-class>
<jstl.api.version>3.0.0</jstl.api.version>
</properties>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

@SpringBootApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.baeldung.springsecuritytaglibs;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.PropertySource;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>

<root level="WARN">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
</head>
<body>
Welcome to Baeldung Secured Page !!!
</body>
</html>
3 changes: 0 additions & 3 deletions spring-boot-modules/spring-boot-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ This module contains articles about Spring Boot Security

- [Spring Boot Security Auto-Configuration](https://www.baeldung.com/spring-boot-security-autoconfiguration)
- [Spring Security for Spring Boot Integration Tests](https://www.baeldung.com/spring-security-integration-tests)
- [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs)
- [Guide to @CurrentSecurityContext in Spring Security](https://www.baeldung.com/spring-currentsecuritycontext)
- [Disable Security for a Profile in Spring Boot](https://www.baeldung.com/spring-security-disable-profile)
- [Spring @EnableWebSecurity vs. @EnableGlobalMethodSecurity](https://www.baeldung.com/spring-enablewebsecurity-vs-enableglobalmethodsecurity)
- [Spring Security – Configuring Different URLs](https://www.baeldung.com/spring-security-configuring-urls)

### Spring Boot Security Auto-Configuration
Expand Down
5 changes: 0 additions & 5 deletions spring-boot-modules/spring-boot-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- security taglib -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
</dependency>
<!-- JSTL -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
Expand Down

0 comments on commit 5104d0d

Please sign in to comment.