java - Spring boot component scan include a single class -


i using spring component scan auto detect beans as:

@componentscan({"com.org.x, com.org.y"}) 

the issue want classes in com.org.x scanned want single class, com.org.y.someservice.class, alone scanned com.org.y

how can achieve ?

also apart using context scan, how can created bean , inject in application context ?

you should define bean using method annotated @bean in configuration class, explained in the documentation.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -