java - How to obtain ClassLoader resources in advance when springboot uses container loading?
我想大声告诉你
我想大声告诉你 2017-05-17 10:00:13
0
1
633

Now directly after the springboot startup is completed, the ClassLoader.getSystemResource method is called again. The system resource cannot be obtained and is directly null. Is there any way to preload ClassLoader into a static variable or object when springboot starts?

我想大声告诉你
我想大声告诉你

reply all(1)
大家讲道理

I encountered a similar problem before. Local development can access the ClassLoader.getSystemResource resource, but it cannot be accessed after the war created by SpringBoot.
Try using ResourceUtils.getURL(usersExistingData).openStream() instead

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!