I have a scenario where I have one api-rest.yml file inside one of the Maven dependencies of my Spring project.
This dependency doesn't have any class in it, only static .md and .yml files.
Is there a way I can read this .yml file?
I've already tried the following approaches:
final ResourceBundle rb = ResourceBundle.getBundle("api-rest.yml");-
final ClassLoader classLoader = this.getClass().getClassLoader(); final ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(classLoader); Resource[] resources = new Resource[0]; try { resources = resolver.getResources("classpath:/**/rest/*.yml"); } catch (final IOException e) { e.printStackTrace(); }