Questions regarding using `@ComponentScan` to detect Spring managed components
Questions tagged [component-scan]
129 questions
0
votes
1 answer
Alfresco personService.createPerson error when using spring component-scan
Some weeks ago, I developed an AMP based on Alfresco 3.4.14.
In that module, I created some customized services. One of the services was used to manage users, with a method to create new users:
public NodeRef createUser() {
…

Yon Santos
- 121
- 1
- 4
0
votes
1 answer
"cvc-complex-type.2.4.c: matching wildcard is strict, but no declaration can be found for element 'context:component-scan'."
I get the following error in my spring-servlet.xml
The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.
My spring-servlet.xml has the following:

user1351077
- 107
- 1
- 4
- 14
0
votes
1 answer
component-scan unable to find components in the parent project
I have a spring mvc project which depends on the spring JPA utility project.
the mvc project is not able to find the repository components in the spring JPA project. I have included the JPA project in the java build path and the deployment…

user2180794
- 1,425
- 7
- 27
- 50
0
votes
2 answers
Issue using component-scan (spring) - not injecting dependencies
I am starting a new app development, and I received some code (the prototype). I noticed the spring-servlet.xml is using the tag:

ThaisK
- 365
- 1
- 4
- 22
0
votes
1 answer
Inject logic into spring component scanning process
So it is possible to use or @ComponentScan("org.rythmengine.spring.web") to allow spring to scan beans under certain package. The question is how can I inject my logic during the scanning process? Say I want to leverage…

Gelin Luo
- 14,035
- 27
- 86
- 139
-1
votes
2 answers
Spring : Does instantiate all beans defined in the base package?

Ajay Sabarish
- 107
- 9
-1
votes
1 answer
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.simple.RealApplication' available
I am having trouble understanding on why my Bean RealApplication is not registered / found.
File DemoApplication.java:
package com.example.simple;
import org.springframework.boot.SpringApplication;
import…

Pradeep Anchan
- 1,469
- 1
- 11
- 11
-1
votes
2 answers
Accessing external Spring config file from runnable jar
Following is my directory structure
/app/infra/myjar/bin --> contains my runnable jar
/app/infra/myjar/config --> contains all external config files which I want to read from code which is inside jar.
Following is my code to read the external…

Shantanoo K
- 765
- 5
- 15
- 43
-2
votes
3 answers
Spring ComponentScan package-structure
My application contains the following classes among others:
SpringMainApplication:
@SpringBootApplication
@ComponentScan(basePackages = {"com.foo"})
class com.foo.appl.SpringMainApplication {
... some code...
}
An interface that should be used to…

eiz
- 15
- 1
- 2