java 21, gradle 8.14 로 변경.
This commit is contained in:
parent
6bb2817654
commit
a0a14fe27c
13
README.md
13
README.md
|
|
@ -10,17 +10,18 @@ This project demonstrates the implementation of security using Spring Boot 3.0 a
|
||||||
* Refresh token
|
* Refresh token
|
||||||
|
|
||||||
## Technologies
|
## Technologies
|
||||||
* Spring Boot 3.0
|
* Spring Boot 3.5
|
||||||
|
* Java 21
|
||||||
* Spring Security
|
* Spring Security
|
||||||
* JSON Web Tokens (JWT)
|
* JSON Web Tokens (JWT)
|
||||||
* BCrypt
|
* BCrypt
|
||||||
* Maven
|
* Gradle
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
To get started with this project, you will need to have the following installed on your local machine:
|
To get started with this project, you will need to have the following installed on your local machine:
|
||||||
|
|
||||||
* JDK 17+
|
* JDK 21+
|
||||||
* Maven 3+
|
* Gradle 8.14+ (or use the bundled Gradle Wrapper `./gradlew`)
|
||||||
|
|
||||||
|
|
||||||
To build and run the project, follow these steps:
|
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`
|
* 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
|
* Navigate to the project directory: cd spring-boot-security-jwt
|
||||||
* Add database "jwt_security" to postgres
|
* Add database "jwt_security" to postgres
|
||||||
* Build the project: mvn clean install
|
* Build the project: `./gradlew build`
|
||||||
* Run the project: mvn spring-boot:run
|
* Run the project: `./gradlew bootRun`
|
||||||
|
|
||||||
-> The application will be available at http://localhost:8080.
|
-> The application will be available at http://localhost:8080.
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,7 @@ public class ApplicationConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AuthenticationProvider authenticationProvider() {
|
public AuthenticationProvider authenticationProvider() {
|
||||||
DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();
|
DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider(userDetailsService());
|
||||||
authProvider.setUserDetailsService(userDetailsService());
|
|
||||||
authProvider.setPasswordEncoder(passwordEncoder());
|
authProvider.setPasswordEncoder(passwordEncoder());
|
||||||
return authProvider;
|
return authProvider;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ spring:
|
||||||
application:
|
application:
|
||||||
security:
|
security:
|
||||||
jwt:
|
jwt:
|
||||||
secret-key: ${SECRET_KEY}
|
secret-key: ${JWT_SECRET_KEY}
|
||||||
expiration: 86400000 # a day
|
expiration: 86400000 # a day
|
||||||
refresh-token:
|
refresh-token:
|
||||||
expiration: 604800000 # 7 days
|
expiration: 604800000 # 7 days
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue