Skip to content
New issue

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

[#10481] Improved to operate normally according to profile settings #10482

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
public class Bootstrap {
private static final Logger logger = LogManager.getLogger(Bootstrap.class);
private static final String SPRING_PROFILE = "spring.profiles.active";
private static final String PINPOINT_PROFILE = "pinpoint.profiles.active";

private volatile static Bootstrap instance;

Expand Down Expand Up @@ -102,7 +103,7 @@ public static Bootstrap getInstance(Map<String, String> jobParameters) {
synchronized(Bootstrap.class) {
if (instance == null) {
String profiles = jobParameters.getOrDefault(SPRING_PROFILE, "local");
System.setProperty(SPRING_PROFILE, profiles);
System.setProperty(PINPOINT_PROFILE, profiles);
instance = new Bootstrap();
logger.info("Bootstrap initialization. : job parameter " + jobParameters);
}
Expand Down