Answer the question
In order to leave comments, you need to log in
How to register a spring service at runtime?
In general, the service code is generated through javassist at runtime. you need to put it in a spring somehow
Answer the question
In order to leave comments, you need to log in
Here is a visual article on the topic:
https://medium.com/@venkivenki4b6/spring-dynamical...
Pay attention to point 4
This can be done in many ways. We will be discussing the following with examples.
GenericBeanDefinition
BeanDefinitionBuilder
BeanFactoryPostProcessor
BeanDefinitionRegistryPostProcessor
Indicate in the context configuration that the desired bean is generated by the factory, and in this factory and generate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question