Ask Your Question
3

At least one bean that qualifies as an autowire candidate is expected, as there is no available bean of type 'java.lang.String'. The dependency annotations are included.

asked 2021-06-19 11:00:00 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-12 18:00:00 +0000

bukephalos gravatar image

This error message means that Spring is trying to autowire a bean of type 'java.lang.String' but cannot find any beans of that type in the application context. The annotations for the dependency have been included, meaning that the class with the dependency has either @Autowired or @Inject annotation, but Spring could not find any appropriate bean to satisfy the dependency.

To fix this error, you can either create a bean of type 'java.lang.String' or change the dependency to a bean that already exists in the application context. Another possible solution is to use the @Qualifier annotation to specify the name of the bean that should be autowired.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-06-19 11:00:00 +0000

Seen: 8 times

Last updated: May 12 '21