kiwoong
@kiwoong
Reviews Written
10
Average Rating
4.6
Posts
Q&A
์ฝ๋ ์์ ์ง๋ฌธ
์ํ java๋ก ๋ฐ์ง๋ฉด static์์ญ์ ํด๋์ค ๋ถ๋ถ์ ์ ์ฅํ๊ณ ์ดํ์ ์ค์ ์ธ์คํด์ค ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ ๊ฑฐ๊ตฐ์!์ ๋ ์ด๋ถ๋ถ ํท๊ฐ๋ ธ๋๋ฐ ๊ฐ์ฌํฉ๋๋ค
- 2
- 2
- 372
Q&A
์ฃผ์! WebSecurityConfigurerAdapter deprecated
์ ๋ AuthenticationManager๋ผ๋ ์ธํฐํ์ด์ค๋ฅผ CustomAuthenticationManager๋ผ๋ ํด๋์ค๋ก ๊ตฌํํ์ฌ ์ฃผ์์ด์. ๊ทธ๋ฆฌ๊ณ ํด๋น ํด๋์ค๋ฅผ ๋น์ ๋ฑ๋กํ์ฌ ์ฃผ๊ณ SecurityConfig์ ์์กด์ฑ์ ์ฃผ์ ํ์ฌ ์ฃผ์๋ต๋๋ค.@Component @RequiredArgsConstructor public class CustomAuthenticationManager implements AuthenticationManager { private final CustomBCryptPasswordEncoder bCryptPasswordEncoder; private final PrincipalDetailsService principalDetailsService; //์ถ์ฒ:https://stackoverflow.com/questions/71281032/spring-security-exposing-authenticationmanager-without-websecurityconfigureradap @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { PrincipalDetails principalDetails = (PrincipalDetails) principalDetailsService.loadUserByUsername(authentication.getName()); if(!bCryptPasswordEncoder.matches(authentication.getCredentials().toString(), principalDetails.getPassword())){ throw new BadCredentialsException("Wrong password!"); } return new UsernamePasswordAuthenticationToken(principalDetails, null, principalDetails.getAuthorities()); }
- 15
- 8
- 4.5K
Q&A
BycryptPasswordEncoder ์ฃผ์ ์ ์ํ์ฐธ์กฐ ๋ฌธ์
์ ์์ฑ์ ์ฃผ์ ๋ฐฉ์์ผ๋ก ํ๋ฉด ์ํ์ฐธ์กฐ๊ฐ ์ ์ผ์ด๋๋์? ๊ตฌ์กฐ ์์ฒด๊ฐ SecurityConfig์์ PrincipalOauth2UserService๋ฅผ ์ฐธ์กฐํ๊ณ ๋ SecurityConfig์์ ๋ฑ๋ก๋๋ BcryptPasswordEncoder๋ฅผ ๋ค์ PrincipalOauth2UserService์์ ์ฐธ์กฐํ์์์. ํด๋น ๊ตฌ์กฐ๋ฅผ ๋ฐ๊พธ์ง ์๊ณ ์ด๋ป๊ฒ ์์ฑ์ ์ฃผ์ ๋ฐฉ์๋ง ์จ๋ ์ํ์ฐธ์กฐ๊ฐ ์์ผ์ด๋๋์?
- 4
- 3
- 1.5K
Q&A
์์ฑ ๋ฉ์๋ setter ์ง๋ฌธ
์.. setter์์ด update๋ฌธ์ ์ด๋ป๊ฒ ์ํํ๋์?? setter๋ฅผ ์ง์ํ๋ ๊ฒ์ด ์ข๋ค๊ณ ํด์ ์ด๋ฒ์ static ํจ์๋ฅผ ์ด์ฉํด์ Create๋งค์๋๋ฅผ ๋ง๋ค์์ต๋๋ค. ๊ทธ๋ฐ๋ฐ ๊ฐ์ฒด์ find๋ฅผ ์จ์ ์ฐพ์ ๋ค ์์ ํ๋ ค๊ณ ํ๋๊น ์ด์ฐํด์ผํ ์ง.. ์ด๋ด ๊ฒฝ์ฐ ํ์ ์์๋ setter๋ฅผ ์์ฐ๊ณ ์ด๋ป๊ฒํ๋์?
- 38
- 8
- 8.2K
Q&A
field-error๊ฐ ์๋จ๋ค์..
๊ฐ์๊ธฐ ์๋๋ค์.. ์์ด๋ฌ๋๊ฑธ๊น์?
- 0
- 2
- 415
Q&A
์ฑ๊ธํค์ DIP ์๋ฐ
์ ๋ ์ด๋ถ๋ถ์ด ์ดํด๊ฐ ์๋ฌ๋๋ฐ ์ค๋ช ์ ๋ฃ๊ณ ๋ ํท๊ฐ๋ฆฌ๋ค์ใ ๊ทธ์ ์๋ AppConfig์์ ๊ตฌํ๊ฐ์ฒด๋ฅผ ๋ง๋ค์๊ณ , ๊ทธ ๊ฐ์ฒด๋ค์ Appconfig ๋ด์์ ์ฐ๊ฒฐํ์ฌ ์ฃผ์๊ธฐ๋๋ฌธ์, ๊ฐ ๊ตฌํ์ฒด ํด๋์ค๊ฐ์ ์์กด๊ด๊ณ๋ ์๋์๋ค. ๋ฐ๋ผ์ DIP๋ง์กฑ์ด๋ค. ๊ทธ๋ฌ๋ ์ฑ๊ธํค ํจํด์ผ ๊ฒฝ์ฐ์๋ ํด๋น ๊ตฌํ ๊ฐ์ฒด๋ฅผ ๊ฐ ๊ตฌํ ํด๋์ค ๋ด์์ ๋ง๋ค๊ณ ์ฐ๊ฒฐํ๋ ํ์ดํ? ํธ์ค๋ง appConfig์์ ์ ๊ณตํด์ค๋ค. ์ฌ์ค์ ๊ตฌํ ๊ฐ์ฒด๋ค์ ์ค์ ๋ก ๊ฐ ๊ตฌํํด๋์ค๋ค ๋ผ๋ฆฌ ์์กดํ๊ณ ์๊ธฐ์ DIP์๋ฐ์ด๋ค? ๋ง๋์? ๋๋ฌด์ด๋ ต๋ค์ ใ
- 1
- 2
- 444
Q&A
๋ฉ๋ชจ๋ฆฌ ๋ถ์กฑ ๋ฌธ์
์ ๋ ๊ทธ๋๋ก ๋ฐ๋ผํ์๋๋ฐ ๋์ง์์ต๋๋ค.
- 0
- 7
- 476
Q&A
๊ฐ์ฌ๋ redux์๋ฌ ์ง๋ฌธ์ด์
https://www.inflearn.com/questions/67821 ์ด ์ง๋ฌธ์ด๋ ๊ฐ์ ๊ฒฝ์ฐ์๋ค์ ใ ใ ์ธํ๋ฐ ์ปค๋ฎค๋ํฐ๊ธฐ๋ฅ ์ข๋ค์!
- 1
- 2
- 231
Q&A
์ ์๋ ์ ์ ๋ ๋ฐฑ๋ ํด๋ collapse ๋ด์ฉ์ด link์๋๋ก ๊ฐ๊น์?
Container className="d-flex"> Link to="/" className="text-white text-decoration-none"> Side Project's Blog Link> Collapse className="ml-auto d-flex justify-content-end" isOpen={isOpen} navbar> Nav navbar> {isAuthenticated ? ( authLink ) : ( guestLink )} Nav> Collapse> NavbarToggler onClick={handleToggle}/> ๋ก ์์ ํด์ ์ผ์ถ ๋น์ทํ๊ฒ๋ ํ์์ต๋๋ค. ๋ต๋ณ๊ฐ์ฌํฉ๋๋ค ใ ใ (์ธ๋ก๋ก ๋์ค๊ธธ๋ Container ClassName์ d-flex๊ฐ์ ์ฃผ์๊ณ , Blog์ด๋ฆ๊ณผ Collapse๊ฐ ๋ถ์ด ์๊ธธ๋ Nav๊ฐ ์๋ Collapse ๊ฐ์ content-end๊ฐ์ ์ฃผ์์ต๋๋ค.)(Nav์ ClassName๊ฐ์ ์ ๊ฑฐ)
- 0
- 2
- 340




