- 아침 일찍 올림픽 공원 산책 나홀로 나무
- 호텔 아침 조식 시간 07:00 ~ 10:00
- 호텔에서 택시타고 식당으로 이동 10분 정도 걸림
This file contains hidden or 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
version: "3" | |
services: | |
mysql-svc: | |
image: mariadb:10.11.8 | |
ports: | |
- "3306:3306" | |
volumes: | |
- C:/docker-volume/mariadb/conf.d:/etc/mysql/conf.d | |
- C:/docker-volume/mariadb/store:/var/lib/mysql | |
env_file: C:/docker-volume/mariadb/env/.env |
This file contains hidden or 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
import org.springframework.security.core.GrantedAuthority; | |
import org.springframework.security.core.authority.SimpleGrantedAuthority; | |
import org.springframework.security.core.userdetails.UserDetails; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class UserInfoUserDetails implements UserDetails { |
This file contains hidden or 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
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.authentication.AuthenticationManager; | |
import org.springframework.security.authentication.AuthenticationProvider; | |
import org.springframework.security.authentication.dao.DaoAuthenticationProvider; | |
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration; | |
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; | |
import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; |
This file contains hidden or 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
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.security.authentication.AuthenticationManager; | |
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; | |
import org.springframework.security.core.Authentication; | |
import org.springframework.security.core.userdetails.UsernameNotFoundException; | |
import org.springframework.security.crypto.password.PasswordEncoder; | |
import org.springframework.web.bind.annotation.*; | |
@RestController | |
@RequestMapping("/api/userinfos") |
This file contains hidden or 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
import jakarta.validation.constraints.Email; | |
import jakarta.validation.constraints.NotNull; | |
import jakarta.validation.constraints.Size; | |
import lombok.Data; | |
@Data | |
public class AuthRequest { | |
@NotNull(message = "Email cannot be null") | |
@Size(min = 2, message = "Email not be less than two characters") | |
This file contains hidden or 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
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.authentication.AuthenticationProvider; | |
import org.springframework.security.authentication.dao.DaoAuthenticationProvider; | |
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; | |
import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; | |
import org.springframework.security.core.userdetails.UserDetailsService; | |
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | |
import org.springframework.security.crypto.password.PasswordEncoder; |
This file contains hidden or 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
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.security.crypto.password.PasswordEncoder; | |
import org.springframework.web.bind.annotation.*; | |
@RestController | |
@RequestMapping("/api/userinfos") | |
public class UserInfoController { | |
@Autowired | |
private UserInfoRepository repository; | |
@Autowired |
This file contains hidden or 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
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.security.core.userdetails.UserDetails; | |
import org.springframework.security.core.userdetails.UserDetailsService; | |
import org.springframework.security.core.userdetails.UsernameNotFoundException; | |
import org.springframework.stereotype.Service; | |
import java.util.Optional; | |
@Service | |
public class UserInfoUserDetailsService implements UserDetailsService { |
This file contains hidden or 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
import com.rookies3.myspringbootlab.security.entity.UserInfo; | |
import org.springframework.data.jpa.repository.JpaRepository; | |
import java.util.Optional; | |
public interface UserInfoRepository extends JpaRepository<UserInfo, Integer> { | |
Optional<UserInfo> findByEmail(String username); | |
} |
NewerOlder