Skip to content

Commit 3a7e4dd

Browse files
maranmaranxiangying
authored andcommitted
fix: remove circular dep in admin svc, adjusts default superuser env flag name and default (#572)
* fix: adjust env var name, default in application.properties vs code and redefine log * fix: remove circular ref (cherry picked from commit f302f45)
1 parent adf65a9 commit 3a7e4dd

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/main/java/org/apache/pulsar/manager/PulsarApplicationListener.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public class PulsarApplicationListener implements ApplicationListener<ContextRef
6060
@Value("${default.environment.bookie_url}")
6161
private String defaultEnvironmentBookieUrl;
6262

63-
@Value("${default.superuser.enable}")
64-
private Boolean defaultSuperuserEnable = false;
63+
@Value("${default.superuser.enabled}")
64+
private Boolean defaultSuperuserEnabled;
6565

6666
@Value("${default.superuser.name}")
6767
private String defaultSuperuserName;
@@ -94,8 +94,8 @@ public void onApplicationEvent(ContextRefreshedEvent event) {
9494
}
9595

9696
private void seedDefaultSuperuser() {
97-
if(defaultSuperuserEnable == false) {
98-
log.debug("Superuser seed disabled");
97+
if(defaultSuperuserEnabled == false) {
98+
log.info("Superuser seed via application.properties is disabled");
9999
return;
100100
}
101101

src/main/java/org/apache/pulsar/manager/service/impl/PulsarAdminServiceImpl.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ public class PulsarAdminServiceImpl implements PulsarAdminService {
7171
@Autowired
7272
private EnvironmentsRepository environmentsRepository;
7373

74-
@Autowired
75-
private EnvironmentCacheService environmentCacheService;
76-
7774
@PreDestroy
7875
public void destroy() {
7976
pulsarAdmins.values().forEach(value -> value.close());

src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ default.environment.service_url=
134134
default.environment.bookie_url=
135135

136136
# default superuser configuration
137-
default.superuser.enable=
137+
default.superuser.enabled=false
138138
default.superuser.name=
139139
default.superuser.password=
140140
default.superuser.email=

0 commit comments

Comments
 (0)