Solved

spring annotation

Posted on 2012-03-29
2
347 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
Comment Utility
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
Comment Utility
thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
This video teaches viewers about errors in exception handling.

744 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

16 Experts available now in Live!

Get 1:1 Help Now