I am working a lot with databases , hibernate , restful apis in Java SE / java EE with HTML clients.
I am pleased to suggest this workflow that relies on Netbeans automatic generation capabilities.
1. Netbeans generates JPA entities from an existing database.
2. Netbeans generates then restful api from the entities.
As it is described at NetBeans Help site.
It is really a breeze to come up fast with a Java backend.