• 什么是spring boot
    独立运行:内嵌了各种servlet容器,tomcat,jetty,只需要一个可执行的jar包就可以执行
    简化配置:spring-boot-starter-web启动器自动依赖其他组件,简少了maven的配置。
    自动配置:

  • spring boot配置文件有哪几种格式。
    .properties和yml

  • spring boot的核心注解是哪个?由哪几个注解组成?
    启动类上面的注解是@springBootApplication,他是spring boot的核心注解,主要包含以下注解
    @springBootConfiguration:组合了@configuration注解,实现了配置文件的功能
    @EnableAutoConfiguration:打开自动配置的功能,也可以关闭某个自动配置的选项
    @ComponentScan:spring 组件扫描

  • 运行spring boot的有哪几种方式

  • 打包用命令或者放到容器中运行 用maven/Gradle插件运行

  • 直接执行main方法运行

更多推荐

springboot面试题总结