Get a list of resources from classpath directory

前端 未结 14 1107
予麋鹿
予麋鹿 2020-11-22 05:20

I am looking for a way to get a list of all resource names from a given classpath directory, something like a method List getResourceNames (String direct

14条回答
  •  臣服心动
    2020-11-22 06:00

    Neither of answers worked for me even though I had my resources put in resources folders and followed the above answers. What did make a trick was:

    @Value("file:*/**/resources/**/schema/*.json")
    private Resource[] resources;
    

提交回复
热议问题