You can create a data source of the required type from scratch or by importing the configuration files that contain the necessary database definitions (e.g. connection settings).

IntelliJ IDEA recognizes Spring, Hibernate, JPA and Tomcat (context.xml) configuration files. If the corresponding files have been developed externally, you must add them to your project prior to performing the import.

In this section:

To import a DB data source
  1. Open the Database tool window.
  2. If there are no data sources currently defined, do one of the following:
    • Right-click the area under the title bar, and select add.png New | Import from sources.
    • Press Alt+Insert and select Import from sources.

    Otherwise, do one of the following:

    • Right-click any of the data source nodes, and select add.png New | Import from sources.
    • Select any of the data source nodes, press Alt+Insert and select Import from sources.
  3. In the Import Data Sources dialog that opens, select the data sources to be created. (The candidate data sources are represented by the appropriate files found in your project.)
To create a DB or DDL data source from scratch
  1. Open the Database tool window.
  2. If there are no data sources currently defined, do one of the following:
    • Right-click the area under the title bar, and click add.png New.
    • Press Alt+Insert.

    Otherwise, do one of the following:

    • Right-click any of the data source nodes, and click add.png New.
    • Select any of the data source nodes and press Alt+Insert.
  3. Select:

See Also

Concepts:

Procedures:

Reference:

Web Resources: