Skip to content

Commit

Permalink
[feat] 자동 배포화 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
isu-nice committed Jul 17, 2023
1 parent 8db53b1 commit 889e97f
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 122 deletions.
72 changes: 31 additions & 41 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
//querysl 추가
buildscript {
dependencies {
classpath("gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10")
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '2.7.12'
id 'org.springframework.boot' version '2.7.13'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
// id "com.ewerk.gradle.plugins.querydsl" version "1.0.10" // Querydsl 플러그인 버전 추가
}

group = 'com.example'
Expand All @@ -18,8 +12,7 @@ java {
sourceCompatibility = '11'
}

//apply plugin: 'io.spring.dependency-management'
apply plugin: "com.ewerk.gradle.plugins.querydsl"
//apply plugin: "com.ewerk.gradle.plugins.querydsl"

configurations {
compileOnly {
Expand Down Expand Up @@ -65,35 +58,36 @@ dependencies {
//aws s3 의존
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'

//Querydsl
implementation 'com.querydsl:querydsl-jpa'
implementation 'com.querydsl:querydsl-apt'
// //Querydsl 버전을 BOM으로 일치시키기
// implementation platform("com.querydsl:querydsl-bom:4.4.2") // Spring Boot 2.7.13에 맞는 Querydsl 버전 사용
// implementation 'com.querydsl:querydsl-jpa'
// annotationProcessor 'com.querydsl:querydsl-apt'
}

//querydsl 추가
def querydslDir = "$buildDir/generated/querydsl"

querydsl {
library = "com.querydsl:querydsl-apt"
jpa = true
querydslSourcesDir = querydslDir
}

sourceSets {
main {
java {
srcDirs = ['src/main/java', querydslDir]
}
}
}

compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}

configurations {
querydsl.extendsFrom compileClasspath
}
//def querydslDir = "src/main/generated/querydsl"
//
//querydsl {
// library = "com.querydsl:querydsl-apt"
// jpa = true
// querydslSourcesDir = querydslDir
//}
//
//sourceSets {
// main {
// java {
// srcDirs = ['src/main/java', querydslDir]
// }
// }
//}
//
//compileQuerydsl {
// options.annotationProcessorPath = configurations.querydsl
//}
//
//configurations {
// querydsl.extendsFrom compileClasspath
//}

dependencyManagement { // 블록 추가
imports {
Expand All @@ -105,11 +99,7 @@ jar {
enabled = false
}

tasks.named('test') {
useJUnitPlatform()
}

tasks.named('test') {
exclude "**/*"
useJUnitPlatform()
}

20 changes: 0 additions & 20 deletions server/src/main/java/actiOn/config/querydsl/QuerydslConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
Expand All @@ -33,12 +33,14 @@
@Configuration
@EnableWebSecurity
@AllArgsConstructor
public class SecurityConfiguration {
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
private final TokenProvider tokenProvider;
private final MemberAuthorityUtil authorityUtil;
private final MemberService memberService;
private final RoleService roleService;

@Bean
public SecurityFilterChain filterChain(HttpSecurity httpSecurity, MemberService memberService, RoleService roleService) throws Exception {
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity
.headers().frameOptions().sameOrigin()

Expand All @@ -60,15 +62,13 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity, MemberService
.apply(new CustomFilterConfigurer())

.and()
.authorizeHttpRequests(authorize -> authorize
.authorizeRequests(authorize -> authorize
.anyRequest().permitAll() /// Todo URI 권한 레벨 설정
)
.oauth2Login(oAuth2 -> oAuth2
.loginPage("/oauth2/authorization/google")
.successHandler(new OAuth2MemberSuccessHandler(memberService, roleService, tokenProvider))
);

return httpSecurity.build();
}

// JwtAuthenticationFilter 구성하는 클래스
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package actiOn.member.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
Expand All @@ -15,6 +16,7 @@ public class PartnerResponseDto {
@Builder
@Getter
@Setter
@AllArgsConstructor
public static class StoreDto {
private String category;
private String storeName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package actiOn.member.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
Expand All @@ -15,6 +16,7 @@ public class PartnerStoreResponseDto {
@Builder
@Getter
@Setter
@AllArgsConstructor
public static class PartnerStoreDto {
private Long storeId;
private String storeImage;
Expand Down

This file was deleted.

0 comments on commit 889e97f

Please sign in to comment.