Announcement Announcement Module
Collapse
No announcement yet.
bean naming stratergy using java config Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • bean naming stratergy using java config

    Is it possible to create bean names dynamically? I have a query that would return me a list of names that I want to give the beans

    for example...
    @Configuration
    public class SomeConfig
    {
    @Bean public MyResource someresource()
    {
    return new someresourceimpl();
    }

    }

    can the name of the bean "someresource" be made dynamic based on some criteria?
    Is there a custom bean naming stratergy? Can anyone share some sample code?
Working...
X