UI Spring Context Holder bean registration (#1026)
* register the Spring Context Holder bean for UI instead of setting the context for each UI separately * reverted test scope for db driver Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
This commit is contained in:
@@ -20,6 +20,7 @@ import org.eclipse.hawkbit.ui.push.HawkbitEventPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.push.HawkbitEventProvider;
|
||||
import org.eclipse.hawkbit.ui.push.UIEventPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.push.UIEventProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SpringContextHolder;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
@@ -81,6 +82,16 @@ public class MgmtUiAutoConfiguration {
|
||||
return new HawkbitEventPermissionChecker(permChecker);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bean for creating a singleton instance of the {@link SpringContextHolder}
|
||||
*
|
||||
* @return the singleton instance of the {@link SpringContextHolder}
|
||||
*/
|
||||
@Bean
|
||||
SpringContextHolder springContextHolder() {
|
||||
return SpringContextHolder.getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* The UI scoped event push strategy. Session scope is necessary, that every
|
||||
* UI has an own strategy.
|
||||
|
||||
Reference in New Issue
Block a user