当前位置:网站首页>The web project accesses static resources inside the reference jar
The web project accesses static resources inside the reference jar
2022-08-10 09:49:00 【Antetokounmpo Blog】
First, the realization principle
In the Servlet3 protocol specification, the resources contained in the JAR file /META-INFO/resources/
can be accessed directly.
Second, examples
As shown in the figure below, it is a new Spring Boot Starter project I created: zimug-minitor-threadpool, which is used to implement a configurable and observable thread pool.Where pool.html
is the monitoring page for the running status of the thread pool.Put it in the position shown in the picture below.
Once the location is correct, pack the project.My final packaging result is zimug-minitor-threadpool-1.0.jar
.When a Spring Boot project needs to reference this jar package, it can be imported directly through maven coordinates.Access the service's /pool.html
to obtain the thread pool configuration information and runtime status information of the current SpringBoot service.
In this way, it is feasible to access the static resources in the jar package.Welcome to pay attention to my announcement number: Antetokounmpo, reply 003 and present the PDF version of the column "The Way of Docker Cultivation" where this article is located, and more than 30 high-quality docker articles.Antetokounmpo blog: zimug.com
边栏推荐
猜你喜欢
随机推荐
数据库中的schema
04 【计算属性 侦听器】
91.(cesium之家)cesium火箭发射模拟
关于编程本质那些事
单例模式基类
vs2012创建WCF应用程序
2022-08-09 第六小组 瞒春 学习笔记
Excel draws statistical graphs
绘制温度曲线图;QChart,
CAD to WPF: Tips on converting CAD drawing files to WPF vector code files (xaml files)
郭晶晶家的象棋私教,好家伙是个机器人
英伟达游戏显卡营收暴跌/ 谷歌数据中心爆炸致3人受伤/ iPhone电量百分比回归…今日更多新鲜事在此...
UE4 粒子特效基础学习 (01-将粒子效果挂载到角色身上)
「业务架构」TOGAF建模:组织分解图(组织映射)
DeepFake换脸诈骗怎么破?让他侧个身
CAD转WPF: 关于CAD图纸文件转换为WPF矢量代码文件(xaml文件)的技巧
shell------常用小工具,sort,uniq,tr,cut
VBA: Inputbox Function and Inputbox Method
navicat导入SQL文件报:[ERR] 2006 - MySQL server has gone away [ERR] -- MySQL dump 10.13 Distrib 5.7.34
makefile 杂项