Step 6: Configuration

At this stage, our first application is now ready. However, before we run the application, we have to provide some configuration details like database connection etc.

Open the src/main/resources/application.properties file and set the database configuration as described bellow.

src/main/resources/application.properties
# Database settings
# ~~~~~
db.default.driver = org.postgresql.Driver
db.default.ddl = update
db.default.url = jdbc:postgresql://localhost:5432/open-platform-demo  (1)
db.default.user = user (2)
db.default.password = secret (3)
1 use the database open-platform-demo
2 the postgresql user
3 the postgresql user’s password
You can also provide external config with -Daxelor.config=/path/to/dev.properties

Create the database using the postgresql’s createdb utility:

$ createdb open-platform-demo

The application.properties has few more settings that you can adjust if you wish.

What’s Next?

In this chapter we seen how to provide application configure. In the next chapter we will see how to run the application and access the web frontend.