X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2FApplication.java;h=1c397fe91594477ab5536f9234f388ee8cac8254;hb=df6a88fba30f6bb730503867058c0971a786bb95;hp=e4b6e5a4892ae7e0bbea9ded0f83b5555d70d17c;hpb=ce1713127bd5445b3890efddf4609cb8b8d58054;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/Application.java b/policy-agent/src/main/java/org/oransc/policyagent/Application.java index e4b6e5a4..1c397fe9 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/Application.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/Application.java @@ -20,7 +20,7 @@ package org.oransc.policyagent; -import org.oransc.policyagent.controllers.StartupService; +import org.oransc.policyagent.tasks.RefreshConfigTask; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; @@ -32,24 +32,21 @@ import org.springframework.context.annotation.Bean; public class Application { @Autowired - private StartupService startupService; + private RefreshConfigTask configRefresh; public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(Application.class); } /** - * Starts the se4rvice and reads the configuration. + * Starts the service and reads the configuration. * - * @param ctx - * @return + * @param ctx the application context. + * + * @return the command line runner performing tasks at startup. */ @Bean public CommandLineRunner commandLineRunner(ApplicationContext ctx) { - return args -> { - - startupService.startup(); - }; + return args -> configRefresh.start(); } - }