IntelliJ IDEA 2016.2 Help

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.

Creating Spring beans for compatibility with Hibernate

  1. Place the caret within the Spring configuration file, and press Alt+Insert.
  2. In the Generate menu select Patterns | Hibernate.
  3. 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.
  4. IntelliJ IDEA guides you through creating beans. You need only to select desired values for bean attributes.

See Also

Language and Framework-Specific Guidelines:

Last modified: 23 November 2016