IntelliJ IDEA provides a rich set of Spring bean templates that enable quick creation of various kinds of beans.
Adding a template bean
- Place the caret within the Spring configuration file, and press ⌘N, ⌃⏎, ⌘N or ⌃⏎⌃N, ⌃⏎, ⌃N or ⌃⏎⌘N, ⌃⏎, ⌘N or ⌃⏎^ N, ⌥ Insert, ⌃N or ⌃N⌥ Insert.
- In the Generate menu, select Template Beans | <template-group> | <template-name>. For example, Template Beans | Common Beans | Resource Factory Bean.
- IntelliJ IDEA guides you through creating a bean. You need only to select the desired values for bean attributes.