图片拷贝不过来,直接从github上下载 。

链接: https://github.com/DFX339/SpringBootDocumentNotes.git

Create a example

pom.xml

Controller:

The defferent between @RestController  and  @Controller:

@Controller  could return jsp、html or   (add @ResponseBody to return json)json

@RestController just could return json.

@RestController  = @Controller +@ResponseBody

@EnableAutoConfiguration: aim to tell springboot how to configure spring.

Main method: to auto starting spring,auto starting the tomcat web server.

When you see that your demo is successful.

@SpringBootApplication on you main class.

Locate you  main class above other clasese package.

@SpringBootApplication = @EnableAutoConfiguration +@ComponentScan

Main class demo  with use the @SpringBootApplication

@Configuration: load one class

@Import : load one special class

@ComponentScan: load all spring conponent.

@Configuration to configure xml

@Configuration :Recommend this annotations

@EnableAutoConfiguration : use this could auto configuration

@EnableAutoConfiguration : to Ingnore some class

@ComponentScan : find  you beans

@Autowired: inject object by constructor.

Structrue codes to use @ComponentScan:

@Repository:always use to annotation the Dao

Default configure file name. application.properties

@SpringBootApplication = @EnableAutoConfiguration + @Configuration + @ComponentScan

Use @EnableAutoConfiguration @Configuration @Import to annotation main class instead of @SpringBootApplication   demo.

@Import : point at some specific classes.

@Component: point at all class.

Springboot-devtools: A powerrful dependency!

Disable to cache in default.

If some files be modified ,the springboot- devtool will restart this program auto.

Restart detailed analysis: springboot worked with two classloaders.

Restart logs: you can figure out it by configuring in application.properties.

spring.devtools.restart.log-condition-evaluation-delta=false

Eclude some files ,project would not to restart when they are changed

Springboot devtool default to start,you can stop it by modifying the System param.

Trigger a brower refresh. (auto)

Use the configure file name definitied by self. Composed with –spring.config.name=Xxxxxx

Use specific configuration

@EnableConfigurationProperties:all class be annotated by @ConfigurationProperties

Use @Valitaded  anotations to validate attributes

Ouput the log fiiles

Springboot support tomcat/jetty ,the default port is 8080

Springboot servlet

Use springboot servlet

Configure springboot servlet in application.properties

Demo in springboot servlet

Modify the port in tomcat

Connect to mysql database;

Tomcat connect pool

Entity Class use @Entity annotations

JOOQ: java object orentied query

Springboot user redis

Connect redis

Springboot provides lots of databases,sql or nosql ,all of those will have XXXTemplate instance to operate.

Springboot cache use demo:

JMS: java message service

JMS-ActionMq:use demo:

JMS send meassages:

RabbitMQ

Send mesages:

Receive messages:

Use restTemplate by RestTemplateBuilder

Use webClient by WebClientBuilder

Springboot use quartz scheduler

50.5

SpringBoot document notes的更多相关文章

  1. vim calendar插件配置

    近日学习markdown,试着记个日志,安装了vim的知名插件calendar:https://github.com/mattn/calendar-vim. 使用网上配置,发现回车之后日期是昨天的,于 ...

  2. Vulkan(1)用apispec生成Vulkan库

    Vulkan(1)用apispec生成Vulkan库 我的Vulkan.net库已在(https://github.com/bitzhuwei/Vulkan.net)开源,欢迎交流. apispec. ...

  3. Azure Active Directory document ---reading notes

    微软利用本地活动目录 Windows Server Active Directory 进行身份认证管理方面具有丰富的经验,现在这一优势已延伸基于云平台的Azure Active Directory.可 ...

  4. Django notes I: collection of links to the Django document

    Links to the Django documents: the Django template language automatically generated context variable ...

  5. SpringBoot和mybatis整合报错:Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 152; columnNumber: 10; 元素类型为 "mapper"

    很明显,报错是xml有问题,于是去检查,发现: 由于粗心,保存的时候,按的太频繁,多按了个s在里面,导致启动报错!

  6. [idea] SpringBoot整合swagger2实现CRUD

    一:创建SpringBoot ,在pom.xml文件中加入jar包 <dependency> <groupId>io.springfox</groupId> < ...

  7. springboot 集成swagger2

    使用Swagger 可以动态生成Api接口文档,在项目开发过程中可以帮助前端开发同事减少和后端同事的沟通成本,而是直接参照生成的API接口文档进行开发,提高了开发效率.这里以springboot(版本 ...

  8. SpringBoot 集成Swagger2自动生成文档和导出成静态文件

    目录 1. 简介 2. 集成Swagger2 2.1 导入Swagger库 2.2 配置Swagger基本信息 2.3 使用Swagger注解 2.4 文档效果图 3. 常用注解介绍 4. Swagg ...

  9. SpringBoot整合开发

    1.SpringBoot分模块 分模块就是将一个项目分成多个模块,即maven项目. 1)首先创建一个springboot的项目: 第一步:选择springboot的项目 第二步:填写项目的相关信息, ...

随机推荐

  1. 算法笔记--最大流和最小割 && 最小费用最大流 && 上下界网络流

    最大流: 给定指定的一个有向图,其中有两个特殊的点源S(Sources)和汇T(Sinks),每条边有指定的容量(Capacity),求满足条件的从S到T的最大流(MaxFlow). 最小割: 割是网 ...

  2. vue element-ui 日期选择器组件 日期时间格式化

    vue element-ui 组件开发大大提高了我们的效率,但有时候并不能满足我们的需求,例如时间,日期组件: element-ui 日期返回的格式是这样的,看下图: 但我们要的是另一个格式 , 如下 ...

  3. 不光是查找值! "二分搜索"

    2018-11-14 18:14:15 二分搜索法,是通过不断缩小解的可能存在范围,从而求得问题最优解的方法.在程序设计竞赛中,经常会看到二分搜索法和其他算法相结合的题目.接下来,给大家介绍几种经典的 ...

  4. Tqdm 进度条可视化模块

    2018-12-04 14:34:25 使用python Tqdm进度条库让你的python进度可视化 Tqdm在阿拉伯语表示进步,在西班牙语中表示我非常爱你.是一个快速,可扩展的Python进度条, ...

  5. Java Config for WebProject

    1.Java EE vs Java SE They are just official SDK,when using IDE,it's ok to just install jdk/jre. &quo ...

  6. 20165303 魏煜第四次实验 Android开发

    实验内容 1实验要求: 参考<Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)>第二十四章: 参考http://www.cnblog ...

  7. 20170906xlVBA_GetEMailFromDocument

    Public Sub GetDataFromWord() AppSettings 'On Error GoTo ErrHandler Dim StartTime, UsedTime As Varian ...

  8. win10+cpu+tensorflow+pycharm

    1.安装64位的python3.5 选择windowsx86-64 executable installer安装 2.安装tensorflow cmd->进入到安装python的Scripts文 ...

  9. 2. 搭建DRF项目

    企业项目开发流程 一.需求分析 1.企业的web项目类型: 商城 门户网站[企业站和门户站] 社交网络 资讯论坛 内部系统 个人博客 内容收费站 前端的静态页面制作,外界开发的时候,是照着psd/pn ...

  10. lanmp环境中创建个软连接

    进入default,创建关于框架的链接 然后编辑配置文件 这样就可以在线上访问了.