package com.blogspot.jandiandme;
public class MyService {
private MyRepository myRepository;
public void setMyRepository(MyRepository myRepository) {
this.myRepository = myRepository;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"
xmlns:context="http://www.springframework.org/schema/context"
default-autowire="byType">
<context:component-scan base-package="com.blogspot.jandiandme"
use-default-filters="false">
<context:include-filter type="regex"
expression=".*Repository" />
<context:include-filter type="regex"
expression=".*Service" />
</context:component-scan>
</beans>
Labels: Spring

I am the Architecture and Technology Manager for adesso AG in Germany. My focus is on Java EE and Spring. I am one of the initial 20 members of the Java Champions. And I like to use my MacBook pro...