코드 정리 및 무중단 테스트

This commit is contained in:
jinia91
2022-05-14 23:36:53 +09:00
parent 62ac5ce43a
commit 8ebe8f89b0
9 changed files with 1 additions and 18 deletions

View File

@@ -17,15 +17,11 @@ public class ProfileController {
@GetMapping("/profile")
public String profile(){
List<String> profiles = Arrays.asList(env.getActiveProfiles());
List<String> realProfiles = Arrays.asList("real", "real1", "real2");
String defaultProfile = profiles.isEmpty()? "default" : profiles.get(0);
String defaultProfile = profiles.isEmpty() ? "default" : profiles.get(0);
return profiles.stream()
.filter(realProfiles::contains)
.findAny()
.orElse(defaultProfile);
}
}

View File

@@ -51,7 +51,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.csrf()
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
// OAuth2 로그인 인증
.and()
.oauth2Login()

View File

@@ -10,15 +10,10 @@ import myblog.blog.member.doamin.Member;
@Getter
@AllArgsConstructor
public class MemberVo {
private Long id;
private String username;
private String userId;
private String email;
private String picUrl;
static public MemberVo from(Member member){

View File

@@ -14,7 +14,6 @@ import java.util.Map;
- 멤버 객체를 래핑한 커스텀 Principal 클래스
*/
public class PrincipalDetails implements OAuth2User {
private final Map<String, Object> attributes;
private final Member member;
private final MemberVo memberVo;

View File

@@ -6,7 +6,6 @@ import java.util.Map;
public class NaverUserInfo implements Oauth2UserInfo {
private final Map<String, Object> attributes;
public NaverUserInfo(OAuth2User oAuth2User) {

View File

@@ -10,10 +10,8 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public enum ProviderType {
GOOGLE("google"),
NAVER("naver");
private final String value;
}

View File

@@ -15,5 +15,4 @@ public enum Role {
ADMIN("ROLE_ADMIN");
private final String value;
}

View File

@@ -23,7 +23,6 @@ import java.util.*;
@Transactional
@RequiredArgsConstructor
public class RssService implements RssUseCase {
private final ArticleUseCase articleUseCase;
@Override

View File

@@ -19,7 +19,6 @@ import java.util.*;
@Transactional
@RequiredArgsConstructor
public class SiteMapService implements SiteMapUseCase {
private final ArticleUseCase articleUseCase;
private final CategoryUseCase categoryUseCase;