Skip to content

Connect to Your Database

julgus edited this page May 10, 2018 · 8 revisions

In the previous guide Installing Speedment, we showed you how to set up your pom-file using our Initializer. If you have completed the previous steps you are ready to connect to your database.

Speedment uses JSON configuration files to generate Java code from your database. The JSON files will be created using the Speedment Tool. This is launched simply by calling mvn speedment:tool in the same directory as your pom-file.

Use the tool to connect to your database.

Speedment now analyses the underlying data sources’ metadata and automatically creates code which directly reflects the structure (i.e. the “domain model”) of the underlying data sources. All it takes is a simple press on the Generate-button.

Done! Speedment has generated models for every table in the database! You can now open your IDE and start coding. You can always go back to the Tool to further configure the generation.

What's Next?

Now when you have a project up and running, you can start with some of the basic API examples, or, you can do the Hello Speedment tutorial!