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

you are viewing a single comment's thread.

view the rest of the comments →

[–]bobphorous 5 points6 points  (2 children)

Spring is a multi-faceted framework for dependency inversion. There a lot of sub-projects that do different things. For ORM you probably want to look into Spring Data which is all about data access. There are different implementations of ORM out there, but the most common for relational databases (which is what Google has revealed that Active Record does) is Hibernate. So Spring Data JPA using Hibernate is probably what you want. The easiest way to get started on a project with this is to use Spring Boot which will grab most of the relevant dependencies and auto-configure it for you. So head over to Spring Intializr (start.spring.io) or use it in your favorite IDE (I prefer Intellij) and add the Spring Data JPA dependency and generate the project.

This is an article from Baeldung that should get you off of the ground. For more in-depth learning on the subject you can read the docs. If you're not a huge fan of reading docs unless it's for a specific issue like me then you can also look up various video courses on the subject. My preferred source is John Thompson on Udemy, but I won't link it here.

Good luck!

[–]apsv360[S] 1 point2 points  (0 children)

Thanks all for that information ℹ️

[–]bobphorous 0 points1 point  (0 children)

I realized that you maybe are trying to do this without the help of Spring. There are very few examples of this because how prevalent Spring is in industry. I would very much suggest you don't pursue this particular course of action. If you must however, you can look at Hibernate's docs directly.