Class StartupApplicationListener
java.lang.Object
de.iip_ecosphere.platform.transport.spring.StartupApplicationListener
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
@Component
@EnableConfigurationProperties({SerializerConfiguration.class,TransportFactoryConfiguration.class})
public class StartupApplicationListener
extends Object
implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Implements operations to be carried out at application start, e.g., setting up configured serializers or the
transport factory. In some contexts, we experienced that
SpringBootApplication.scanBasePackageClasses on
this package disturbs the spring initialization, in particular spring cloud multi-binder settings. Then the
underlying functionality can be utilized directly through RegistrationHelper or this class can be subclassed
in the application and marked as component.- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SerializerConfigurationprivate booleanprivate TransportFactoryConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
-
Field Details
-
cfg
-
transportCfg
-
done
private boolean done
-
-
Constructor Details
-
StartupApplicationListener
public StartupApplicationListener()
-
-
Method Details
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-