Skip to content

Commit

Permalink
fix: remove circular dep in admin svc, adjusts default superuser env …
Browse files Browse the repository at this point in the history
…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)
  • Loading branch information
maranmaran authored and xiangying committed Jan 12, 2025
1 parent adf65a9 commit 3a7e4dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public class PulsarApplicationListener implements ApplicationListener<ContextRef
@Value("${default.environment.bookie_url}")
private String defaultEnvironmentBookieUrl;

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

@Value("${default.superuser.name}")
private String defaultSuperuserName;
Expand Down Expand Up @@ -94,8 +94,8 @@ public void onApplicationEvent(ContextRefreshedEvent event) {
}

private void seedDefaultSuperuser() {
if(defaultSuperuserEnable == false) {
log.debug("Superuser seed disabled");
if(defaultSuperuserEnabled == false) {
log.info("Superuser seed via application.properties is disabled");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ public class PulsarAdminServiceImpl implements PulsarAdminService {
@Autowired
private EnvironmentsRepository environmentsRepository;

@Autowired
private EnvironmentCacheService environmentCacheService;

@PreDestroy
public void destroy() {
pulsarAdmins.values().forEach(value -> value.close());
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ default.environment.service_url=
default.environment.bookie_url=

# default superuser configuration
default.superuser.enable=
default.superuser.enabled=false
default.superuser.name=
default.superuser.password=
default.superuser.email=
Expand Down

0 comments on commit 3a7e4dd

Please sign in to comment.