当前位置:网站首页>【Environment】1. Get the configuration in YML through the environment in the configuration class
【Environment】1. Get the configuration in YML through the environment in the configuration class
2022-06-12 14:36:00 【Understand the principle + good code skills】
@Configuration
public class EnvironmentConfig {
private static final Logger logger = LoggerFactory.getLogger(EnvironmentConfig.class);
@Autowired
private Environment environment;
public int getServerPort() {
return environment.getProperty("server.port", Integer.class);
}
}
边栏推荐
- Sorting out the differences between ABS () and Fabs () in C language
- C secret arts script Chapter 5 (paragraph) (Section 3)
- Redis core configuration and advanced data types
- [wechat applet] 1 Introduction to wechat applet
- Two methods of QT using threads
- [wp][入门]攻防世界-game
- 工业机械臂(机器人)视觉定位引导系统
- Ppt cannot be opened, always prompt how to fix it
- Raspberry pie get temperature and send pictures to email
- QT database realizes page turning function
猜你喜欢
[wechat applet] 4 Introduction to wechat developer tools
C語言中主函數調用另外一個函數,匯編代碼理解
Reverse the encryption parameters of a hot water software
For cross-border e-commerce, the bidding strategy focusing more on revenue - Google SEM
Appnium (I) basic use of appnium
Player actual combat 16 xdecode class
[early knowledge of activities] list of recent activities of livevideostack
Markdown edit
程序分析与优化 - 6 循环优化
2022版Redis数据删除策略
随机推荐
[wechat applet] 2 Environmental preparation
C secret arts script Chapter 5 (paragraph) (Section 3)
Server concurrency - note 1
Player actual combat 22 to solve the problems of flower screen and Caton
[ROC] aspriseocr C # English, Digital identification (not Chinese)
Program analysis and Optimization - 6 loop optimization
En langage C, la fonction principale appelle une autre fonction et assemble le Code pour comprendre
Two methods of implementing asynchronous calling function with QT
How to set, reset and reverse bit
Use Baidu AIP to obtain the text in the specified area of the screen
C magic skill Chapter 4 (detailed explanation of memory function)
JS (II) syntaxerror: cannot use import statement outside a module
2022版Redis数据删除策略
Leetcode 2185. Counts the string containing the given prefix
Redis data deletion policy in 2022
Solve the problem that IEEE latex template cannot display Chinese
jenkins的RPC测试项目
JS (I) error [err\u module\u not\u found]: cannot find package 'UUID' imported
Create a slice slice pit using the make method
Crawler problem set (I) record