๐Ÿ‘ป [WHYGRAM] | ์‹œํ๋ฆฌํ‹ฐ - UnsatisfiedDependencyException , ์„ธํ๋ฆฌํ‹ฐ ์ ์šฉ ํ›„ user/join ํ™”๋ฉด ์•ˆ์—ด๋ฆผ

0

๐Ÿ‘ป WHYGRAMย 

๋ชฉ๋ก ๋ณด๊ธฐ
2/16
post-thumbnail

๐Ÿ”น ์—๋Ÿฌ

  • ์„ธํ๋ฆฌํ‹ฐ ์ ์šฉ ํ›„ user/join ํ™”๋ฉด ์•ˆ์—ด๋ฆผ

๐Ÿ”น ์—๋Ÿฌ๋ฉ”์‹œ์ง€

org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'userController': 
Unsatisfied dependency expressed through field 'service';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'userService': 
Unsatisfied dependency expressed through field 'passwordEncoder'; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'securityConfig': 
Unsatisfied dependency expressed through field 'userDetailsService'; 
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'inMemoryUserDetailsManager' defined 
in class path resource [org/springframework/boot/autoconfigure/security/servlet/UserDetailsServiceAutoConfiguration.class]: 
Bean instantiation via factory method failed; 
nested exception is org.springframework.beans.BeanInstantiationException: 
Failed to instantiate [org.springframework.security.provisioning.InMemoryUserDetailsManager]: 
Factory method 'inMemoryUserDetailsManager' threw exception; 
nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: 
Error creating bean with name 'passwordEncoder': 
Requested bean is currently in creation: 
Is there an unresolvable circular reference?
  • ๊ทธ๋ƒฅ ํ†ฐ์บฃ ์‹คํ–‰๋งŒ ํ•ด๋„ ์—๋Ÿฌ๊ฐ€ ๋œฌ๋‹ค
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'springSecurityFilterChain' defined 
in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: 
Bean instantiation via factory method failed; 
nested exception is org.springframework.beans.BeanInstantiationException: 
Failed to instantiate [javax.servlet.Filter]: 
Factory method 'springSecurityFilterChain' threw exception;
nested exception is java.lang.IllegalArgumentException:
defaultTarget must start with '/' or with 'http(s)'

๐Ÿ”น ํ•ด๊ฒฐ

SecurityConfig์˜ 42๋ฒˆ ๋ผ์ธ์—
1. feed/home ๊ฒฝ๋กœ๊ฐ€ ์—†์—ˆ๋‹ค
2. / feed/home ์ด๋ผ๊ณ  ์ ์–ด์•ผ ํ•˜๋Š”๋ฐ feed/home์ด๋ผ๊ณ  ์ ์–ด์„œ, ์ฆ‰ /๋ฅผ ๋นผ๋จน์—ˆ๋‹ค
3. ๊ฒฝ๋กœ(์ปจํŠธ๋กค๋Ÿฌ)์™€ html์„ ๋งŒ๋“ค๊ณ  /feed/home์ด๋ผ๊ณ  ์ ์–ด์ฃผ๋‹ˆ ํ•ด๊ฒฐ๋˜์—ˆ๋‹ค

profile
๋ช‡ ๋ฒˆ์„ ๋„˜์–ด์ ธ๋„ ์•ž์œผ๋กœ ๊ณ„์† ๋‚˜์•„๊ฐ€์ž

0๊ฐœ์˜ ๋Œ“๊ธ€