欢迎来到在线考试题库网 在线考试题库官网
logo
全部科目 > 大学试题 > 计算机科学 > MVC考试

单项选择题

spring开启扫描注解的功能是()

    A.<property name="driverClass"value="com.mysql.jdbc.Driver"></property>
    B.<context:component-scan base-package="com.mhys"></context:component-scan>
    C.<property name="user"value="root"></property>
    D.<property name="jdbcUrl"value="jdbc:mysql://127.0.0.1:3306/mysql"></property>

点击查看答案&解析

相关考题

  • 单项选择题
    关于@PostConstruct说法错误的是()

    A.在方法上加该注解会在项目启动的时候执行该方法
    B.可用于加载数据字典
    C.可用于定时任务
    D.在方法上加该注解会在项目结束的时候执行该方法

  • 单项选择题
    关于@Scope错误的是()

    A.Scope("singleton")
    B.Scope("prototype")
    C.Scope("response")
    D.Scope("session")

  • 单项选择题
    @PostConstruct注解的方法在整个Bean初始化中的执行顺序是()

    A.Constructor(构造方法)->@Autowired(依赖注入)->@PostConstruct(注释的方法)
    B.Constructor(构造方法)->@PostConstruct(注释的方法)->@Autowired(依赖注入)
    C.@PostConstruct(注释的方法)->Constructor(构造方法)->@Autowired(依赖注入)
    D.@Autowired(依赖注入)->Constructor(构造方法)->@PostConstruct(注释的方法)

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题