S
S
Sergey Nizhny Novgorod2017-06-07 13:50:32
Java
Sergey Nizhny Novgorod, 2017-06-07 13:50:32

How to create tables in a database for Spring MVC?

Hello everyone
Now I'm watching tutorials on Spring MVC - there people set up a database, connect to it through some pgAdmin and start creating all the tables and so on with pens. Then they make a connection to it using Hibernate and work.
Let's say in Django (python) - I just describe the model with fields, and the framework itself eventually makes all the tables in the database. It's convenient enough.
The question is, how do tables in the database usually do in Java and connect this business to models?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2017-06-07
@Terras

Almost the same as in Django. They describe the models, set the hibernate.hbm2ddl.auto parameter to create in the configuration, and Hibernate will create the tables itself at startup.

P
protven, 2017-06-07
@protven

You can also look here https://jhipster.github.io/
You make a model in their JDL studio and then you can generate at least front, at least back, at least scripts for the database from the file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question