当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Plot temperature curves; QChart,
消息队列概述
阻塞队列与线程池原理
关于镜像源的一些记录
Nvidia's gaming graphics card revenue plummets / Google data center explosion injures 3 people / iPhone battery percentage returns... More news today is here...
并发的基本概念,操作,容器
「数据架构」数据模型,数据字典,数据库模式 和ERD的比较
武功修炼:招式
关于编程本质那些事
细说Redis监控和告警
LiveNVR操作日志页面快速筛选上级国标平台的调用记录直播观看录像回看等操作
Oracle rac所在的网络要割接,停掉其中一个rac节点,这种方案可行吗?
单例模式基类
IDEA中xml文件头报错:URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)
ELK框架搭建[通俗易懂]
Flink运行时架构 完整使用 (第四章)
Lasso regression (Stata)
07 【动态组件 组件注册】
[Metaverse Omi Says] Listen to how Rabbit Fan Rabbit creates a new era of trendy play from virtual to reality
用高质量图像标注数据加速AI商业化落地