Before writing batch operations, write an example of a single usage for comparison. The following code is provided: 1. bean file configuration: [html] www.2cto.com <bean id = "userDao" class = "... "/> <bean id =" userService "class = "... "> <property name =" userDao "> <ref bean =" userDao "/> </property> </bean> 2. java code [java] @ Autowired private UserDao userdao; in this way, you can call the methods in UserDao because dao and service have multiple methods in a project, this requires many similar configurations. The following uses the service as an example to describe how to implement batch automatic loading. We assume that all service files are placed on com. test. under biz 1. directory structure 2. bean file configuration [html] <? Xml version = "1.0" encoding = "UTF-8"?> <Beans xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://www.springframework.org/schema/beans" xmlns: context = "http://www.springframework.org/schema/context" xmlns: p = "http://www.springframework.org/schema/p" xsi: schemaLocation = "http://www.springframework.org/schema/beans http: // localhost: 8080/schema/www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework. Org/schema/context http: // localhost: 8080/schema/www.springframework.org/schema/context/spring-context.xsd "default-autowire =" byName "> ① <context: component-scan base-package =" com. test. biz. impl "> ② <context: include-filter type =" regex "expression = ". * Impl "/> ③ </context: component-scan> </beans> ① set automatic loading to the file configured by name ② scanned package ③ 3. user. java [java] package com. test. biz; public interface User {String getName ();} 4. userImpl. java [java] package com. test. biz. impl; import com. test. biz. user; public class UserImpl implements User {private String name = "aaa"; public String getName () {return this. name ;}} 5. use [Java] @ Autowired private User in java; 6. this is done. If there is a new service, you only need to write the server File in the biz directory. You don't need to configure the bean file any more ~