INJECT A CUSTOM BEAN IN A CUSTOM CLASS

cancel
Showing results for 
Search instead for 
Did you mean: 
alaeddine
Member II

INJECT A CUSTOM BEAN IN A CUSTOM CLASS

I'M ASKING FOR THE SECOND TIME

 

i have a custom bean in context-service.xml and i'm using AIO archetype and my bean looks like these :

<!-- -->

<bean id="UtilBeanId" class="com.util.Utils">
 <property name="serviceRegistry">
 <ref bean="ServiceRegistry" />
 </property>
</bean>

<!-- -->

and i want to inject UtilBeanId in onther class let's called  CustomeClass

 

my custom Class look's like these 

public CustomeClass implment TaskListner

{

//the bean i want to inject is here 

private Utils utils 

//setter and getter for utils

}

 

 

 

 

 

1 Reply
alaeddine
Member II

Re: INJECT A CUSTOM BEAN IN A CUSTOM CLASS