We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print ClassLoader.getResources("") results in main method:
ClassLoader.getResources("")
public static void main(String[] args) throws IOException { Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(""); while(resources.hasMoreElements()) { System.err.println(resources.nextElement()); } System.err.println("====="); SpringApplication.run(DemoApplication.class, args); }
file:/private/tmp/demo/target/classes/ =====
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/ jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-starter-web-1.5.4.RELEASE.jar!/ jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-starter-1.5.4.RELEASE.jar!/ jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-1.5.4.RELEASE.jar!/ jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-autoconfigure-1.5.4.RELEASE.jar!/ jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-starter-logging-1.5.4.RELEASE.jar!/ =====
cd target unzip demo-0.0.1-SNAPSHOT.jar -d test cd test java org.springframework.boot.loader.PropertiesLauncher
file:/private/tmp/demo/target/test/ file:/private/tmp/demo/target/test/BOOT-INF/classes/ =====
The text was updated successfully, but these errors were encountered:
This is by design (see #7003). Is the current behaviour causing a problem?
Sorry, something went wrong.
Some libraries depend on ClassLoader.getResources("") to scan annotations. When run in fat jar, it may scan excess classes.
There is no problem, I just have some doubts, thanks.
No branches or pull requests
Print
ClassLoader.getResources("")
results in main method:The text was updated successfully, but these errors were encountered: