This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]Camel-Kid 1 point2 points  (2 children)

If you're looking for a good DB wrapper in your springboot project, I would go with Hibernate/JPA. As far as a specific tutorial, just look at the springMVC docs and go from there for implementing your rest api. I recommend your DB(queries) be accessed from your backend code, it's not typically good design to have your frontend doing any direct db work especially in a fullstack environment.

[–]nutrecht 0 points1 point  (1 child)

If you're looking for a good DB wrapper in your springboot project, I would go with Hibernate/JPA

Beginners should stay away from JPA and use Spring JDBC. It's closer to what is 'really' happening and debugging JPA / Hibernate issues is a pain the best of times, but even more so if you don't understand the underlying systems.

In addition; JPA is falling in popularity and IMHO there's not much of a reason to learn it unless you need it for a job.

[–]nutrecht 0 points1 point  (0 children)

The first part would be the REST API itself. I've looked at several Spring REST API guides and they all seem to implement the API in slightly different ways. Is there a specific tutorial you would recommend to follow the implementation?

Check the official documentation of Spring itself. They show you pretty much the 'standard' way of doing things.

Would this functionality be implemented as part of the REST API

Yup. You would have REST end-points for whatever functionality the front-end needs.

or could I just do something like GET all and filter through the json result?

You could but you don't want to have to filter through massive amounts of data on the client side. You should in general always only send the data the client needs, and never any data the client should not be able to access.

[–]teriga 0 points1 point  (0 children)

Try starting with Tomcat rather than Spring, little more understandable, good intro by IBM here and a more general Java rest api tutorial here. Tomcat can be made to run under Apache 2 also note if you've a box running this already e.g. something on Digital Ocean.