Can't resolve component-scan base-package with wildcard character
My project is a common framework. So I need to add <component-scan/> with wildcard character base-package。Such as
<context:component-scan base-package="com.*.*.service" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.beans.factory.annotation.Autowired"/>
<context:include-filter type="annotation" expression="javax.annotation.Resource"/>
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/>
<context:include-filter type="annotation" expression="org.springframework.context.annotation.Scope"/>
</context:component-scan>
But the sub project code in IDEA can't resolve Spring Bean with @Service or other ann after adding the Spring Fact and XML config File.
The sub project local Spring XML Config File and code can't resolve the spring bean declared by @Service. I can't see the flag ahead of @Autowired member variable.
For example. The sub project declare Spring bean with java code such as below:
@Service("cxf.users.soap")
public class SoapServiceImpl implements SoapService {
.....
}
And the usage in local Spring xml config file such as :
<jaxws:endpoint id="SoapService" serviceName="soa:SoapService" implementor="#cxf.users.soap"
address="/${ws.protocol.soap.path}/soapService"/>
The IDEA give me an error: Cannot resolve Spring Bean 'cxf.users.soap'. And I can't remove it at all.
Not only cxf, other declaration base on xml and java code can't resolve the spring bean with @Service totally.
Please sign in to leave a comment.
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA with a sample project to reproduce.