#SPRINGRequired a bean of type 'String' that could not be found

7 messages · Page 1 of 1 (latest)

blissful muralBOT
#

This post has been reserved for your question.

Hey @stray moth! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

stray moth
#

How to create bean with String constructor argument ?

#

Singleton bean of course

untold agate
#
 @Bean
    public MyBean myBean(String arg) {
        return new MyBean(arg);
    }
stray moth
#

Yes, it did not work as well

#

I was getting the same error