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
I am trying to run the below command to start a springboot application
java -Dlog4j.configuration=file:///log4j.properties -Dspring.profiles.active=local -cp ./target/app-1.0.0-SNAPSHOT-jar-with-dependencies.jar MainClass
the jar above is prepared using maven-assembly-plugin the configuration for which is
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>${maven-assembly-plugin.version}</version> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>MainClass</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin>
Main class looks like
@SpringBootApplication @Slf4j public class MainClass { public static void main(String... args) { log.info(System.getProperty("spring.profiles.active")); ApplicationContext ctx = SpringApplication.run(AcctrvDataProcessor.class, args); log.info(Arrays.toString(ctx.getEnvironment().getActiveProfiles())); int exitCode = SpringApplication.exit(ctx); System.exit(exitCode); } }
When I run the application from the above command I am seeing the below log:
15:45:07.091 [main] INFO MainClass - local 15:46:07.091 [main] INFO MainClass - No active profile set, falling back to 1 default profile: "default"
What could be preventing the spring profile actives from being set?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to run the below command to start a springboot application
the jar above is prepared using maven-assembly-plugin the configuration for which is
Main class looks like
When I run the application from the above command I am seeing the below log:
What could be preventing the spring profile actives from being set?
The text was updated successfully, but these errors were encountered: