Skip to content

Commit

Permalink
optimize CommonUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
yanhom1314 committed Jan 4, 2024
1 parent 960d3b8 commit e967f80
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ private CommonUtil() { }

// fix #I8SSGQ
String env = environment.getProperty("spring.profiles.active");
if (null == env) {
if (StringUtils.isBlank(env)) {
String[] profiles = environment.getActiveProfiles();
if (profiles.length < 1) {
profiles = environment.getDefaultProfiles();
}
if (profiles.length > 1) {
if (profiles.length >= 1) {
env = profiles[0];
}
}
Expand Down

0 comments on commit e967f80

Please sign in to comment.