I have a very simple Java Springboot project connect to the database. Still, I want a mongoDB connection and I could use mongoDB as well.
I read lots of document and I can't make it work. And my commits code is:
https://github.com/GuoJing/spb/commit/20c04ce38d43bb0ba229d0d3577fdccbd571062e
If adding @AutoWired annotation, application will not start. I think this should be same as official document.
in src/main/java/controller/UserController.java
@Autowired
private UserPropsRepository userPropsRepository;
Here is my project, could anybody help me?
https://github.com/GuoJing/spb
My Exception is:
***************************
APPLICATION FAILED TO START
***************************
Description:
Field userPropsRepository in controller.UserController required a bean of type 'repository.UserPropsRepository' that could not be found.
Action:
Consider defining a bean of type 'repository.UserPropsRepository' in your configuration.