首页 > 其他分享 >SpringBoot官方笔记8其他

SpringBoot官方笔记8其他

时间:2023-07-17 22:55:29浏览次数:36  
标签:SpringBoot spring Boot 笔记 jar application 官方 Spring

Container Images

FROM eclipse-temurin:17-jre as builder
WORKDIR application
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} application.jar
RUN java -Djarmode=layertools -jar application.jar extract

FROM eclipse-temurin:17-jre
WORKDIR application
COPY --from=builder application/dependencies/ ./
COPY --from=builder application/spring-boot-loader/ ./
COPY --from=builder application/snapshot-dependencies/ ./
COPY --from=builder application/application/ ./
ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]
$ docker build --build-arg JAR_FILE=path/to/myapp.jar .

Production-ready Features

The spring-boot-actuator module provides all of Spring Boot’s production-ready features.

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
</dependencies>

Endpoints

Actuator endpoints let you monitor and interact with your application. Spring Boot includes a number of built-in endpoints and lets you add your own. For example, the health endpoint provides basic application health information.

Monitoring and Management Over HTTP

If you are developing a web application, Spring Boot Actuator auto-configures all enabled endpoints to be exposed over HTTP. The default convention is to use the id of the endpoint with a prefix of /actuator as the URL path. For example, health is exposed as /actuator/health.

Loggers

  • TRACE

  • DEBUG

  • INFO

  • WARN

  • ERROR

  • FATAL

  • OFF

  • null

Deploying Spring Boot Applications

You can deploy Spring Boot applications to a variety of cloud platforms, to virtual/real machines, or make them fully executable for Unix systems.

Kubernetes

Spring Boot auto-detects Kubernetes deployment environments by checking the environment for "*_SERVICE_HOST" and "*_SERVICE_PORT" variables. You can override this detection with the spring.main.cloud-platform configuration property.

总结

快速刷完SpringBoot官方网站,刚开始还比较能看懂,越到后面越发现,整个内容偏向于“配置”说明,能吸收和理解的知识很少,从我做的笔记也是能看出来这点。

这跟SpringBoot本身的设计也是一致的,即SpringBoot是在Spring Framework基础之上做的“自动配置”,从繁杂的xml配置中解脱出来,SpringBoot本身就是一个外壳。

学习SpirngBoot,需要对它的内核进行学习,也就是Spring Framework,还好也有官方文档,虽然有点难找:

https://docs.spring.io/spring-framework/reference/overview.html

标签:SpringBoot,spring,Boot,笔记,jar,application,官方,Spring
From: https://www.cnblogs.com/df888/p/17561529.html

相关文章

  • 决策单调性优化DP 学习笔记 & P4767 [IOI2000] 邮局 题解
    0.题面题目描述高速公路旁边有一些村庄。高速公路表示为整数轴,每个村庄的位置用单个整数坐标标识。没有两个在同样地方的村庄。两个位置之间的距离是其整数坐标差的绝对值。邮局将建在一些,但不一定是所有的村庄中。为了建立邮局,应选择他们建造的位置,使每个村庄与其最近的邮局......
  • 组合数学学习笔记
    组合数学学习笔记组合数学常用公式基本公式排列:\[A_{n}^r=\frac{n!}{(n-r)!}\]组合:\[C_{n}^r=\frac{n!}{r!(n-r)!}\\\dbinom{n}{r}=\frac{n!}{r!(n-r)!}\]组合公式杨辉恒等式......
  • 第一篇博客 练习typora笔记
    学习MarkDown字体helloworld!helloworld!helloworld!helloworld! 引用 乐交诤友不交损友 分割线 图片  超链接点击跳转到百度 列表ABC 无序列表ABC 列表姓名性別年齡張三男18 代碼publicvoid......
  • springboot下使用rabbitMQ之开发配置方式(一)
    springboot下使用rabbitMQ之开发配置方式(一)距离上次发布博客已经小一年了,这次...嗯,没错,我又回来啦.........
  • C++笔记(2)——函数
    六.函数6.1函数基础一个典型的函数(function)定义包括:返回类型(returntype)、函数名字,由0或多个形参(parameter)组成的列表以及函数体。我们通过调用运算符来执行函数,形式为"()"。函数调用完成两项工作:一是用实参初始化函数对应的形参,二是将控制权转移给被调用函数。此时,主调......
  • mysql 笔记
    行转列: namecoursegradezhangsanjava20zhangsanc#60zhangsanpython40lisijava109lisic#30lisipython20wangwujava33 selectname,sum(casewhencourse='java'thengradeend)as'java',sum(casewhen......
  • 小红书获得小红书笔记详情 API 返回值说明
    ​ item_get_video-获得小红书笔记详情 注册开通smallredbook.item_get_video公共参数名称类型必须描述keyString是调用key(必须以GET方式拼接在URL中)secretString是调用密钥api_nameString是API接口名称(包括在请求地址中)[item_search,item_get,item_s......
  • Learning hard C#学习笔记——读书笔记 03
    C#是面向对象的语言,每次到这里就会有一个问题,什么是对象,其实一句话就可以解释,那就是——万物皆是对象,这句话就像“如来”一样抽象,其实,我们无须在这上面耗费太大的精力,我们随着学习的深入,对象的概念自然会深入到脑海中所有面向对象的编程语言都有以下三个基础特征封装——把客......
  • Learning hard C#学习笔记——读书笔记 02
    每每说到类,不得不介绍的就是类的定义,它是一个抽象的概念,它是一个模板,制造对象的模板1.定义一个类classPreson{//类的成员变量}默认情况下,class关键字没有显式的使用internal修饰符来定义类,但是没有必要这样做,默认的修饰符就是internal除了internal这个权限修饰......
  • Reactjs学习笔记
    本篇是关于React的简介ReactJS是Facebook推出的一款前端框架,2013年开源,提供了一种函数式编程思想,拥有比较健全的文档和完善的社区,在React16的版本中对算法进行了革新,称之为ReactFiber。开发环境搭建需要nodeJS解析器,以及npm(node的包管理工具)如何引用React1.使用.js来引入......