Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

spring annotation

Posted on 2012-03-29
2
Medium Priority
?
411 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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…
Suggested Courses

660 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