From a0a14fe27c947f50a91765827bb21601a69f410b Mon Sep 17 00:00:00 2001 From: Hyojin Ahn Date: Mon, 8 Jun 2026 09:28:59 -0400 Subject: [PATCH] =?UTF-8?q?java=2021,=20gradle=208.14=20=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 +++++++------ .../java/com/goi/erp/config/ApplicationConfig.java | 3 +-- src/main/resources/application.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e3e7f79..77ba0bf 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,18 @@ This project demonstrates the implementation of security using Spring Boot 3.0 a * Refresh token ## Technologies -* Spring Boot 3.0 +* Spring Boot 3.5 +* Java 21 * Spring Security * JSON Web Tokens (JWT) * BCrypt -* Maven +* Gradle ## Getting Started To get started with this project, you will need to have the following installed on your local machine: -* JDK 17+ -* Maven 3+ +* JDK 21+ +* Gradle 8.14+ (or use the bundled Gradle Wrapper `./gradlew`) To build and run the project, follow these steps: @@ -28,7 +29,7 @@ To build and run the project, follow these steps: * Clone the repository: `git clone https://github.com/ali-bouali/spring-boot-3-jwt-security.git` * Navigate to the project directory: cd spring-boot-security-jwt * Add database "jwt_security" to postgres -* Build the project: mvn clean install -* Run the project: mvn spring-boot:run +* Build the project: `./gradlew build` +* Run the project: `./gradlew bootRun` -> The application will be available at http://localhost:8080. diff --git a/src/main/java/com/goi/erp/config/ApplicationConfig.java b/src/main/java/com/goi/erp/config/ApplicationConfig.java index f353ac0..57e8ee2 100644 --- a/src/main/java/com/goi/erp/config/ApplicationConfig.java +++ b/src/main/java/com/goi/erp/config/ApplicationConfig.java @@ -46,8 +46,7 @@ public class ApplicationConfig { @Bean public AuthenticationProvider authenticationProvider() { - DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider(); - authProvider.setUserDetailsService(userDetailsService()); + DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider(userDetailsService()); authProvider.setPasswordEncoder(passwordEncoder()); return authProvider; } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 25eb34c..8ff1041 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -17,7 +17,7 @@ spring: application: security: jwt: - secret-key: ${SECRET_KEY} + secret-key: ${JWT_SECRET_KEY} expiration: 86400000 # a day refresh-token: expiration: 604800000 # 7 days