tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

How BookRepository injected in BookController without showing as bean?

Open zubaidullo opened this issue 7 years ago • 1 comments

I'm new in Spring boot and trying to understand how you injected BookRepository in BookController? When I run your sample project, it's throwing an exception. Actually, it's not a problem to solve, but if this tutorial is used in baeldung.com then, many beginners should have the same problem.

Field bookRepository in .....web.BookController required a bean of type '.....persistence.repo.BookRepository' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)

zubaidullo avatar Jan 16 '19 07:01 zubaidullo

@zubaidullo Could you please let us know which article is this?

maibin avatar Jan 20 '19 18:01 maibin