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
Post a Comment