Java EE框架整合开发入门到实战:Spring+Spring MVC+MyBatis(微课版)
上QQ阅读APP看书,第一时间看更新

习题3

1.Bean的实例化有哪几种常见的方法?

2.简述基于注解的装配方式的基本用法。

3.@Autowired和@Resource有什么区别?

4.Bean的默认作用域是(  )。

A.page

B.request

C.singleton

D.prototype

5.在下面代码片段中使用@Controller注解装配了Bean,而Bean的id是(  )。

A.TestController

B.testController

C.无id

D.任意名称