Using Spring Bean Patterns
When developing application using Spring framework, you'll most likely need to use some persistence, for example, Hibernate. To bind a data access to Spring configuration, you need to create corresponding beans. To save your time, IntelliJ IDEA provides Bean patterns, so you don't have to manually code those beans. These patterns include beans for:
There are also bean patterns for SDK Timer and OpenSymphony Scheduler.
Because all procedures are similar, we'll describe how to use Hibernate pattern, for instance.
To create Spring beans for compatibility with hibernate
- Place the caret within the Spring configuration file, and press Alt+Insert.
- In the Generate menu select Patterns | Hibernate.
- In the Add Hibernate Beans dialog box, select what beans you want to create. By default, required ones are already selected. If Hibernate libraries are missing in the module, click Fix to configure them. Click OK.
- IntelliJ IDEA guides you through creating beans. You need only to select desired values for bean attributes.