
์ ์๋ ๊ฑฐ ๊ทธ๋๋ก
zip๋ค์ด,yaml์์ ,db์ฐ๊ฒฐ ํ๋๋ฐ ์ด๋ฉ์ผ ์ธ์ฆ์ด ์๋๋ค.
์์ธ :
DB์authCd๊ฐnull์ด ๋์ด์ผ ํ๋๋ฐ ๊ทธ๋๋ก ๋จ์์์ด์- ํ์๊ฐ์ ์ด ๋์ง ์์๋ค.
securityํจํค์ง์SecurityConfig์configure(HttpSecurity http)์http.authorizeRequests().antMatchers()๋ฅผ ์์
"/user/auth"๋ฅผ ์ถ๊ฐ
http.authorizeRequests()
.antMatchers("/user/login", "/user/join").permitAll()
.anyRequest().authenticated();
๐
http.authorizeRequests()
.antMatchers("/user/login", "/user/join", "/user/auth").permitAll()
.anyRequest().authenticated();
NullPointerException
NullPointerException
userService์์imgArr์ดNull์ด๋ผ์- ์ด๋ฏธ์ง ์ ์ฅ ๋ฒํผ์ ๋๋ฅด๋ฉด ์๋ฌ๊ฐ ๋ฌ๋ค

profile.html์์<input type="file">ํ๊ทธ์name์ ๋๊ฐ์ดimgArr๋กUserService์profile.html์์์ ์ด๋ฆ์ ํต์ผํด์ฃผ์๋๋ ํด๊ฒฐ๋์๋ค.
spring boot security๋ฅผ ์ฌ์ฉํ์ง ์์๋๋ฐ security login form์ด ๋์ฌ๋
pom.xml์security๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์์์ง๋ง ์ฌ์ฉํ์ง ์์ ์ํ์์ ์คํ์ ํ๋๋ฐsecurity login form์ด ๋์๋ค.
- ๊ทธ๋์
pom.xml์security๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ (org.thymeleaf.extras/thymeleaf-extras-springsecurity5) ์ฃผ์์ฒ๋ฆฌ๋ฅผ ํ๋ค- ๊ทธ๋ฌ๋ ์ฌ์ ํ
security login form์ด ๋์๋ค.
org.thymeleaf.extras/thymeleaf-extras-springsecurity5
๋ง๊ณ ๋org.springframework.boot/spring-boot-starter-security
๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์์๋ค.
pom.xml์
org.springframework.boot/spring-boot-starter-security์org.thymeleaf.extras/thymeleaf-extras-springsecurity5๋ฅผ ๋ชจ๋ ์ฃผ์์ฒ๋ฆฌ ํRearoadํ๋security login form์ด ์ฌ๋ผ์ก๋ค.