Spring 标签学习日记(一)

来源:互联网 发布:php ceil 编辑:程序博客网 时间:2024/05/19 13:45

@Repository    //定义一个Dao


@Autowired    //自动注入Bean


@Service   //定义一个service


@RunWith()  //指定测试运行器


@ContextConfiguration(locations={""})  //指定spring配置文件


@Test  //标注测试方法


@Colltroller  //定义一个mvc 控制器


@RequsetMapping(value="/index.html")  //处理“index.html”的请求


@Configuration  //代表配置信息提供类


@Bean  //定义一个Bean


@Component  //定义一个中间类,类似工具类


@Qualifier  //指定注入bean的名称


@Scope  //指定Bean的作用范围


@PostConstruct  //实例化bean后,执行


@PreDestroy  //当容器关闭时执行


@Bean  //定义Bean

0 0
原创粉丝点击