Refactor code

- remove unnecessary code
- moving package
This commit is contained in:
Rebwon
2021-09-15 16:21:49 +09:00
committed by MaengSol
parent b9e1e52de6
commit 3f5bb61227
5 changed files with 6 additions and 11 deletions

View File

@@ -1,13 +1,10 @@
package com.yam.app.account.presentation;
package com.yam.app.account.infrastructure;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 현재 로그인 되어있는 사용자의 세션 AccountPrincipal 객체를 반환합니다.
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface LoginAccount {

View File

@@ -1,6 +1,5 @@
package com.yam.app.account.presentation;
package com.yam.app.account.infrastructure;
import com.yam.app.account.infrastructure.SessionManager;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.core.MethodParameter;

View File

@@ -1,4 +1,4 @@
package com.yam.app.account.presentation;
package com.yam.app.account.infrastructure;
import java.util.List;
import org.springframework.context.annotation.Configuration;

View File

@@ -2,8 +2,8 @@ package com.yam.app.account.presentation;
import com.yam.app.account.application.AccountFacade;
import com.yam.app.account.infrastructure.AccountPrincipal;
import com.yam.app.account.infrastructure.LoginAccount;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping(
produces = MediaType.APPLICATION_JSON_VALUE,

View File

@@ -108,8 +108,8 @@ final class AccountIntegrationTests {
void authentication_member_find_info_success() throws Exception {
//Arrange
var session = new MockHttpSession();
session.setAttribute(SessionManager.LOGIN_ACCOUNT,
new AccountPrincipal("loginCheck@gmail.com"));
var sessionManager = new SessionManager(session);
sessionManager.setPrincipal(new AccountPrincipal("loginCheck@gmail.com"));
//Act
final var actions = mockMvc.perform(get(FIND_INFO)