• 2022-06-03
    下面哪些注解是Spring的原始注解?
    A: @Component
    B: @Controller
    C: @Scope
    D: @Bean
  • A,B,C

    内容

    • 0

      使用Spring的原始注解不能全部替代xml配置文件,下面哪些是不能使用Spring原始注解实现的? A: 非自定义的Bean的配置 B: 加载properties文件的配置 C: 组件扫描的配置 D: 引入其他文件配置文件

    • 1

      在spring中, @Component 注解表示( )。 A: 定义一个Spring管理的Bean B: 定义自动注入 C: 定义该Bean为单例 D: 定义该一个切面

    • 2

      Spring中,要将一个已经声明的bean,注入到当前类的成员变量,使用的注解是() A: @bean B: @autowire C: @value D: @Controller

    • 3

      下列哪些注解可以在SpringMVC中使用() A: @ResponseBody B: @Component C: @Autowired D: @Controller

    • 4

      @Bean注解的方法所在的类应该使用哪个注解 A: @Component B: @Configuration C: @Service D: @Repository