zoukankan      html  css  js  c++  java
  • springboot核心注解小记

    springboot核心注解为:@SpringBootApplication

    该注解由以下几个注解组成:

    @EnableAutoConfiguration

    允许springboot自动配置注解,springboot会根据当前类路径下的包或者类来配置spring bean

    @Configuration

    Spring3.0添加的注解,用来代替applicationContext.xml配置文件

    @SpringBootConfiguration

    这个注解就是 @Configuration 注解的变体,只是用来修饰是 Spring Boot 配置而已,或者可利于 Spring Boot 后续的扩展。

    @ComponentScan

    这是 Spring 3.1 添加的一个注解,用来代替配置文件中的 component-scan 配置,开启组件扫描,即自动扫描包路径下的 @Component 注解进行注册 bean 实例到 context 中。




  • 相关阅读:
    Nginx日志管理
    Nginx负载均衡
    Nginx 缓存
    Nginx代理服务器
    Nginx搭建 Web服务
    Nginx HTTP模块
    洛谷P1012拼数
    洛谷 P1876 开灯
    洛谷P2084 进制转化
    关于typedef的用法
  • 原文地址:https://www.cnblogs.com/flysand/p/14707076.html
Copyright © 2011-2022 走看看