Solved

spring annotation

Posted on 2012-03-29
2
362 Views
Last Modified: 2012-04-08
hi guys

I am using this confirugation in my spring xml to handle annotation

<context:annotation-config/>
<context:component-scan base-package="com.mat.delegate" />


com.mat.delegate package has 10 delegates

DelegateOne.java
DelegateTwo.java
DelegateThree.java
DelegateFour.java
...
DelegateTen.java

If i want to load only DelegateOne.java and avoid the rest of the delegate classes, how can i do that? Do i use filters?

thanks
0
Comment
Question by:royjayd
2 Comments
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 37785062
Try this ...

<context:component-scan base-package="com.mat.delegate" use-default-filters="false">
   <context:include-filter type="regex" expression=".*DelegateOne" />
</context:component-scan>

Open in new window

0
 

Author Comment

by:royjayd
ID: 37821928
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now