Comments (3)
When you launch an application with java -jar
(I assume that's what you're doing), you cannot specify additional classpath locations. In other words, you cannot use both -jar
and -cp
at the same time. This is a limitation of the JVM.
You may be able to achieve your goal by launching your application differently. Something like this:
java -cp application.jar:another/location org.springframework.boot.loader.launch.JarLauncher
If you have any further questions, please follow up on Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.
from spring-boot.
An idea: load jar java -cp application.jar:another/location org.springframework.boot.loader.launch.JarLauncher; but it's me want configuration "spring.messages.basename" can special path file jar outsite; as load default application.properties in the folder ./config same path file boot jar.
I think didn't need classpath in ".getResources("classpath*:" + target + ".properties");" so I would like to organize folder storage struct message*.properties outsite change config text easy no rebuild source code.
from spring-boot.
Unfortunately, that isn't how the JDK's ResourceBundle
works. Please see its getBundle
method and the description of how it uses ClassLoader.getResource()
for details.
As I said above, please follow up on Stack Overflow if you have any further questions.
from spring-boot.
Related Issues (20)
- spring.json.type.mapping, kafka producer doesn't work with spring boot 3.3.0 HOT 3
- Provide a single command for generating a CDS archive from an uber jar HOT 3
- Add support for official kafka containers HOT 1
- @Autowired fails in @ConfigurationProperties subclasses HOT 7
- Make conversion mechanism plural
- Make conversion mechanism plural
- Exclude plexus-utils in favor of the version that's built into Maven
- Exclude plexus-utils in favor of the version that's built into Maven
- Exclude plexus-utils in favor of the version that's built into Maven
- PropertiesMigrationListener wrongly reports property as deprecated
- PropertiesMigrationListener wrongly reports property as deprecated
- Closing org.springframework.web.context.support.GenericWebApplicationContext issue during running Test class HOT 3
- Configuration property parsing list has unexpected behavior HOT 2
- @RedisHash timeToLive is a long, which is not compatible with the use of SPeL HOT 1
- Run Docker-based tests serially
- Run Docker-based tests serially
- Combine tests for standard and Bitnami images into single classes
- Replace RFC 7807 by RFC 9457 in property documentation
- Combine tests for standard and Bitnami images into single classes
- Rework fix for #21992 to avoid polluting Gradle Module Metadata with mavenOptional… variants
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.