This repository has been archived by the owner on Aug 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
89 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../java/com/photobook/user/dto/UserDto.java → src/main/java/com/photobook/dto/UserDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.photobook.user.dto; | ||
package com.photobook.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...com/photobook/user/mapper/UserMapper.java → ...java/com/photobook/mapper/UserMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.photobook.service; | ||
|
||
import com.photobook.dto.UserDto; | ||
|
||
import javax.servlet.http.HttpSession; | ||
|
||
public interface LoginService { | ||
|
||
void setLoginUserInfo(UserDto userDto); | ||
|
||
void removeLoginUserInfo(); | ||
|
||
UserDto getLoginUserInfo(); | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
...m/photobook/user/service/UserService.java → ...va/com/photobook/service/UserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/com/photobook/service/impl/LoginServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.photobook.service.impl; | ||
|
||
import com.photobook.dto.UserDto; | ||
import com.photobook.service.LoginService; | ||
import org.springframework.stereotype.Service; | ||
|
||
import javax.servlet.http.HttpSession; | ||
|
||
@Service | ||
public class LoginServiceImpl implements LoginService { | ||
|
||
private static final String LOGIN_USER_INFO = "LOGIN_USER_INFO"; | ||
|
||
private final HttpSession httpSession; | ||
|
||
public LoginServiceImpl(HttpSession httpSession) { | ||
this.httpSession = httpSession; // Scoped Proxy | ||
} | ||
|
||
@Override | ||
public void setLoginUserInfo(UserDto userDto) { | ||
httpSession.setAttribute(LOGIN_USER_INFO, userDto); | ||
} | ||
|
||
@Override | ||
public void removeLoginUserInfo() { | ||
httpSession.invalidate(); | ||
} | ||
|
||
@Override | ||
public UserDto getLoginUserInfo() { | ||
return (UserDto) httpSession.getAttribute(LOGIN_USER_INFO); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
src/main/java/com/photobook/user/service/LoginService.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
src/main/java/com/photobook/user/service/impl/LoginServiceImpl.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters