Skip to content

Tag: spring

Send data object using key

I want to create something like quick switch to send Java object based on Key. I tried this: Full code example: https://github.com/rcbandit111/Code_Switch_Select_POC/blob/main/src/main/java/org/poc/PocController.java Is it possible to use @Service(“first”) instead of @Component(“first”…

Using Spring Framework Scheduler in a non-bean class

I have Spring used in a legacy project and would like to use “Scheduled” runs in a class that is not created as a bean, but as a usual “new” class. So annotations such as @Scheduled are not active. How can I then enable scheduling by calling all relevant Spring methods explicitly? Answ…