From 6a9705ee17b11e239f0f7130345dacc4e2e7b392 Mon Sep 17 00:00:00 2001 From: LeeJiWon Date: Thu, 22 Aug 2024 22:23:24 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20spring=20security,=20jwt=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 42 ++++++++++--------- .../media/user/config/SecurityConfig.java | 7 ++++ 2 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 src/main/java/wanted/media/user/config/SecurityConfig.java diff --git a/build.gradle b/build.gradle index dd80e82..cd13b6d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,40 +1,42 @@ plugins { - id 'java' - id 'org.springframework.boot' version '3.2.8' - id 'io.spring.dependency-management' version '1.1.6' + id 'java' + id 'org.springframework.boot' version '3.2.8' + id 'io.spring.dependency-management' version '1.1.6' } group = 'wanted' version = '0.0.1-SNAPSHOT' java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } } configurations { - compileOnly { - extendsFrom annotationProcessor - } + compileOnly { + extendsFrom annotationProcessor + } } repositories { - mavenCentral() + mavenCentral() } dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'org.springframework.boot:spring-boot-starter-web' - compileOnly 'org.projectlombok:lombok' - runtimeOnly 'com.h2database:h2' - runtimeOnly 'com.mysql:mysql-connector-j' - annotationProcessor 'org.projectlombok:lombok' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-security' + implementation 'io.jsonwebtoken:jjwt:0.9.1' + compileOnly 'org.projectlombok:lombok' + runtimeOnly 'com.h2database:h2' + runtimeOnly 'com.mysql:mysql-connector-j' + annotationProcessor 'org.projectlombok:lombok' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { - useJUnitPlatform() + useJUnitPlatform() } diff --git a/src/main/java/wanted/media/user/config/SecurityConfig.java b/src/main/java/wanted/media/user/config/SecurityConfig.java new file mode 100644 index 0000000..0d84f89 --- /dev/null +++ b/src/main/java/wanted/media/user/config/SecurityConfig.java @@ -0,0 +1,7 @@ +package wanted.media.user.config; + +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; + +@EnableWebSecurity +public class SecurityConfig { +}