下面是配置文件,其中要注意的是要把context的namespace和schemaLocation加到beans的属性里,schemaLocation的顺序也很重要,必须是: http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd 之后在java的类里加入    @Autowired 就可以自动地把配置文件中类型合适的bean注入进来。 [code lang="java"] @Autowired private ExeBPELVersionDaoImpl edao; [/code] [code lang="xml"] [/code]