当前位置:网站首页>Static method to get configuration file data
Static method to get configuration file data
2022-08-05 03:25:00 【zhanghe_zht】
The data in the injection configuration file cannot be read in the writing tool class, the solution
1. The tool class should be decorated with @Component
2. Use the @Value annotation to inject the data in the configuration file into ordinary variables
3. Assign ordinary variables to static variables through the @PostConstruct annotation
The data in the configuration file can be obtained through the static method of the above steps

边栏推荐
- 论治理与创新,2022 开放原子全球开源峰会 OpenAnolis 分论坛圆满落幕
- public static
List asList(T... a) What is the prototype? - Developing Hololens encountered The type or namespace name 'HandMeshVertex' could not be found..
- 905. 区间选点
- You may use special comments to disable some warnings. 报错解决的三种方式
- 21 Days Learning Challenge (2) Use of Graphical Device Trees
- 使用二维码传输文件的小工具 - QFileTrans 1.2.0.1
- 2022.8.4-----leetcode.1403
- private package
- 十五. 实战——mysql建库建表 字符集 和 排序规则
猜你喜欢

.NET应用程序--Helloworld(C#)

Flink 1.15.1 Cluster Construction (StandaloneSession)

2022-08-04 The sixth group, hidden from spring, study notes

Why did they choose to fall in love with AI?

MRTK3开发Hololens应用-手势拖拽、旋转 、缩放物体实现

Initial solution of the structure

冒泡排序与快速排序

YYGH-13-客服中心

A small tool to transfer files using QR code - QFileTrans 1.2.0.1

The Tanabata copywriting you want has been sorted out for you!
随机推荐
Confessing the era of digital transformation, Speed Cloud engraves a new starting point for value
使用二维码传输文件的小工具 - QFileTrans 1.2.0.1
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals
Turn: Charles Handy: Who you are is more important than what you do
QT MV\MVC structure
大像素全景制作完成后,推广方式有哪些?
How to solve the error cannot update secondary snapshot during a parallel operation when the PostgreSQL database uses navicat to open the table structure?
sql怎么找字段里所有数据为空的字段
Android实战开发-Kotlin教程(入门篇-登录功能实现 3.3)
IJCAI2022 | DictBert: Pre-trained Language Models with Contrastive Learning for Dictionary Description Knowledge Augmentation
Slapped in the face: there are so many testers in a certain department of byte
告白数字化转型时代,时速云镌刻价值新起点
Study Notes-----Left-biased Tree
Tencent Cloud [Hiflow] New Era Automation Tool
Ffmpeg - sources analysis
undo problem
Linux下常见的开源数据库,你知道几个?
[论文笔记] MapReduce: Simplified Data Processing on Large Clusters
Use @Mapper to query the partition status of oracle and report an error
ffmpeg enumeration decoders, encoders analysis