您的位置:首页 > 编程语言 > Java开发

Spring使用教程(三)泛型依赖注入

2015-06-16 22:37 531 查看
package com.test.spring.beans;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
public static void main(String[] args) {
ApplicationContext con=new ClassPathXmlApplicationContext("beans_fanxing.xml");

UserService u=(UserService)con.getBean("userService");

u.add();
}
}


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: