I am using the following method to get a resource from WAR file in WildFly:
this.getClass().getResource(relativePath)
It works when the app
I decided so:
@Autowired private final ApplicationContext ctx; private final Path path = Paths.get("testfiles/load") ctx.getRosource("classpath:" + path);