• What is Spring Boot?

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”.
You can use Spring Boot to create Java applications that can be started using java -jar or more traditional war deployments.

  • What are the advantages of spring boot application?

Provide a range of non-functional features that are common to large classes of projects (e.g. embedded servers, security, metrics, health checks, externalized configuration).
Opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss.
Absolutely no code generation and no requirement for XML configuration.
Provide a radically faster and widely accessible getting started experience for all Spring development.

  • What are the requirements of Spring boot System?

Spring Boot 1.5.9.RELEASE requires
Java 7 +
Spring 4.3.13 +

For build support
Maven 3.2+
Gradle 2.9+

Container Support
Tomcat 7+
Jetty 8+ (Jetty 9.3 requires JDK 8 +)

Read more Spring boot system requirements

  • What are the use of @EnableAutoConfiguration annotation?

This annotation tells Spring Boot to “guess” how you will want to configure Spring, based on the jar dependencies that you have added.

Read more @enableautoconfiguration spring boot example

//和最后一个一起看一下

  • What is Spring Boot Starter?

Spring Boot provides a number of “Starters” that make easy to manage dependencies for your project.

Read More Spring boot starter

//一系列 starter

  • What is spring-boot-starter-parent?

The spring-boot-starter-parent is a special starter that makes Maven or Gradle dependency-management easier by adding jars to your classpath.

Read More spring-boot-starter-parent

//需要看一下链接

  • What is spring-boot-starter-web?

This starter will add Tomcat and Spring MVC dependency to our application and its default configuration.

Read More spring-boot-starter-web

//需要看一下链接

  • How to create an executable jar using spring boot?

Add this below plugin to pom.xml

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins>
</build>

Use mvn clean package to create executable jar file

Read More spring boot executable jar example

  • How do you run and stop spring boot executable jar?

Open cmd or shell window and use java -jar as shown below

$ java -jar myproject-0.0.1-SNAPSHOT.jar

To stop use ctrl+C

Read More run spring boot jar from command line

  • How do you change JDK version in spring boot?

Java 1.6 as the default compiler level.
You can overwrite it by adding java.version property tag as shown below

<properties><java.version>1.8</java.version>
</properties>
  • How to disable specific auto-configuration in spring boot?

You can use exclude property as shown below to disable specific auto configuration

@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
  • What is the use of @SpringBootApplication annotation?

The @SpringBootApplication annotation is equivalent to using @Configuration, @EnableAutoConfiguration and @ComponentScan with their default attributes

Since many spring Boot developers have their main class annotated with @Configuration, @EnableAutoConfiguration and @ComponentScan, spring boot provides you a new annotation @SpringBootApplication as replacement.

//这个三个注解的作用?

转载于:https://www.cnblogs.com/vicky-project/p/9192903.html

Spring Boot Questions- Part 1相关推荐

  1. 面试那点小事,你从未见过的spring boot面试集锦(附详细答案)

    一, 什么是spring boot? 多年来,随着新功能的增加,spring变得越来越复杂.只需访问页面https://spring.io/projects,我们将看到所有在应用程序中使用的不同功能的 ...

  2. Spring Boot下Druid连接池的使用配置分析

    引言: 在Spring Boot下默认提供了若干种可用的连接池,Druid来自于阿里系的一个开源连接池,在连接池之外,还提供了非常优秀的监控功能,这里讲解如何与Spring Boot实现集成. 1.  ...

  3. spring boot 在eclipse里启动正常,但打包后启动不起来

    现象描述: spring boot 在eclipse里启动正常,但打包后启动不起来. 错误日志如下: D:\Project>java -jar MKKY_CMS.jar. ____ _ __ _ ...

  4. spring boot多数据源配置(mysql,redis,mongodb)实战

    使用Spring Boot Starter提升效率 虽然不同的starter实现起来各有差异,但是他们基本上都会使用到两个相同的内容:ConfigurationProperties和AutoConfi ...

  5. spring boot单元测试

    做一个稳健的开发,写一首漂亮的单元测试是少不了的 首先要分清几个概念:测试方法.测试类.测试集.测试运行器. 测试方法就是用 @Test 注解的一些函数. 测试类是包含一个或多个测试方法的一个 XxT ...

  6. Vue + Element UI + Spring Boot——易班优课YOOC课群在线测试自动答题解决方案(十)问题管理页面

    前文 JavaScript--易班优课YOOC课群在线测试自动答题解决方案(一)答案获取 Spring Boot--易班优课YOOC课群在线测试自动答题解决方案(二)答案储存 Spring Boot- ...

  7. Spring Boot——易班优课YOOC课群在线测试自动答题解决方案(六)后端改造

    前文 JavaScript--易班优课YOOC课群在线测试自动答题解决方案(一)答案获取 Spring Boot--易班优课YOOC课群在线测试自动答题解决方案(二)答案储存 Spring Boot- ...

  8. Spring Boot——易班优课YOOC课群在线测试自动答题解决方案(三)答案查询

    前文 JavaScript--易班优课YOOC课群在线测试自动答题解决方案(一)答案获取 Spring Boot--易班优课YOOC课群在线测试自动答题解决方案(二)答案储存 问题分析 Maven & ...

  9. Spring Boot——易班优课YOOC课群在线测试自动答题解决方案(二)答案储存

    前文 JavaScript--易班优课YOOC课群在线测试自动答题解决方案(一)答案获取 问题分析 前端数据 Maven <!--Spring Boot Web--><depende ...

  10. Spring Boot之HelloWorld

    视频网址:http://www.iqiyi.com/w_19ruksbpf1.html <project xmlns="http://maven.apache.org/POM/4.0. ...

最新文章

  1. Oracle VS DB2 数据类型
  2. source insight删除保存路径为中文的project工程项目报错的解决办法
  3. 实现MySQL远程连接
  4. 集成学习之参数调整策略
  5. Python打印A~Z的26个字母,你会怎样打印?
  6. [论文阅读] Unifying Global-Local Representations in Salient Object Detection with Transformer
  7. 阿里云开源镜像站下载最新Ubuntu和CentOS镜像
  8. Kotlin — 适用于 Web 开发
  9. VMware基础架构和运营管理
  10. 【elasticsearch】安装合集
  11. Intel SGX开发者参考书(一)——Intel SGX引言
  12. Docker的Pull Digest和Image ID
  13. android wifi热点默认名称,Android 修改WiFi热点的默认SSID和密码
  14. c++判断整数翻转溢出_C++整数溢出
  15. python爬取豆瓣电影排行榜函数_摆脱剧荒:教你用Python爬取豆瓣电影最新榜单
  16. 2023跨境出海指南:韩国网红营销白皮书
  17. 怎么自定义服务器的404,如何自定义404页面
  18. 拉勾网企业招聘信息分析报告
  19. 自动驾驶--高精地图技术
  20. 今天决定把java基础再重头学习一遍

热门文章

  1. 发生了未经处理的异常
  2. 如果你昨天刚离职却忘了退公司的群,转天一早领导找你让你尽快退群,你会做何感想呢?
  3. 天天早上慢跑一小时对身体好吗?
  4. 创业需要的学习能力不是读书考试做题也不是所谓的思维格局
  5. 华为p40为何没有搭载鸿蒙系统?
  6. rabbitmq 客户端golang实战
  7. 数据交换-电路/报文/分组交换
  8. 2021 年高教社杯全国大学生数学建模竞赛题目(B 题 乙醇偶合制备 C4 烯烃)
  9. Js利用Div自定义提示框弹窗+定时器
  10. sql server 入门_SQL Server查询调整入门