spring boot知识点4

1.如何监视所有spring boot微服务

安装actuator插件,然后通过接口查询 /actuator/health

2.spring boot项目性能如何优化

a.优化启动时间,去除重复的依赖

b.JVM优化(java虚拟机优化),限制堆的最小最大值

c.数据库查询优化,要避免查询表的所有

d.并发优化,对于执行时间较长的逻辑,改为异步处理

3.spring boot项目如何实现热部署

a.安装spring-boot-devtools

b.在properties添加配置,实现自动重启

复制代码
spring.devtools.restart.enabled=true
spring.devtools.livereload.enabled=true

4.spring boot微服务中如何实现session共享

用redis

5.你使用了哪些starter maven依赖

security,,jdbc,actuator

6.spring boot项目中的starter是什么

一组预置依赖包,为了简化配置,提高开发效率

7.spring boot如何实现定时任务

通过设置@Scheduled注解配置定时服务

定时服务有哪些

fixedRate=5000 每五秒执行一次

cron = "0 30 8 * * ?" 每天8点30执行

fixedDelay=5000 任务执行完成五秒后再次执行

8.spring-boot-starter-parent的作用

a.提供默认的配置,依赖以及插件管理,减少版本冲突

9.spring boot项目如何打包

用maven的install

10.spring boot打的jar包与普通的jar包有什么区别

spring boot打的包

a.有启动类

b.有内嵌的启动容器,比如tomcat

c.有内置的依赖库

d.有资源文件,比如html,css图片等

相关推荐
Code哈哈笑5 小时前
【MongoDB 基本语法】数据库和集合的基本操作--探秘 MongoDB
数据库·mongodb
恋红尘5 小时前
Redis面试八股
数据库·redis·面试
少许极端5 小时前
算法奇妙屋(七)-字符串操作
java·开发语言·数据结构·算法·字符串操作
懒羊羊不懒@5 小时前
Java基础语法—字面量、变量详解、存储数据原理
java·开发语言
望获linux5 小时前
【实时Linux实战系列】实时 Linux 的自动化基准测试框架
java·大数据·linux·运维·网络·elasticsearch·搜索引擎
Code blocks5 小时前
GB28181视频服务wvp部署(一)
java·spring boot·后端
我命由我123455 小时前
Spring Boot - Spring Boot 静态资源延迟响应(使用拦截器、使用过滤器、使用 ResourceResolver)
java·spring boot·后端·spring·java-ee·intellij-idea·intellij idea
Xzh04235 小时前
前后端学习的交界
java·ajax·maven·axios·测试
直有两条腿6 小时前
【数据迁移】HBase Bulkload批量加载原理
大数据·数据库·hbase
豆沙沙包?6 小时前
2025年--Lc201- 378. 有序矩阵中第 K 小的元素(排序)--Java版
java·线性代数·矩阵