[์์ฑ ์ค]
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.example.service.BoardService required a bean of type 'com.example.repository.BoardRepository' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.example.repository.BoardRepository' in your configuration.
์ค๋ฅ ๋ฉ์์ง๋ฅผ ๋ณด๋ฉด, BoardService์ ์์ฑ์ ์ฒซ ๋ฒ์งธ parameter์ ํ์ํ BoardRepository bean์ ์ฃผ์ ๋ฐ์์ผ ํ๋๋ฐ BoardRepository๊ฐ bean์ผ๋ก ๋ฑ๋ก๋์ด ์์ง ์์ ๋ฐ์ํ๋ ์ค๋ฅ์ด๋ค.
์คํ๋ง๋ถํธ์ @ComponentScan ์ด๋ ธํ ์ด์ ์ ์ง์ ๋ ๋ฒ์ ์์์ ์ปดํฌ๋ํธ๋ฅผ ์ฐพ์ ์๋์ผ๋ก ๋น์ผ๋ก ๋ฑ๋กํ๊ณ ๊ด๋ฆฌํด์ค๋ค. ์ด๋ ์ด ์ปดํฌ๋ํธ์๋ @Component, @Repository, @Service, @Controller, @Configuration