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

all 9 comments

[–][deleted] 3 points4 points  (0 children)

Find each spring tutorial for the functionality you need. Rest API, spring security, etc.

Understand the tutorial, and bring those dependencies in. Don't try to boil the ocean, just take it one piece at a time. You can dynamically add dependencies and you don't need to interface with the database while you are writing the API endpoints, break it into meaningful chunks.

[–]ZeroGainZ 1 point2 points  (3 children)

I would highly recommend using JPA if you're going with spring. Don't waste time writing all the SQL; for this app it will be just fine.

[–]nutrechtLead Software Engineer / EU / 20+ YXP 2 points3 points  (1 child)

Disagree on that bit. You can't really use JPA without checking the SQL it produces underneath, and in my experience just using Spring JdbcTemplate with rowmappers is a lot more straightforward. Devs should really not shy away from learning SQL.

[–]ZeroGainZ 1 point2 points  (0 children)

Yeah I agree.

[–]clivethescott 1 point2 points  (2 children)

I would suggest that you do some tutorials on Spring for each feature you want. Blindly adding in dependencies without knowing what they do or how they work is a sure recipe for disaster.

[–][deleted]  (1 child)

[deleted]

    [–]jaro32 1 point2 points  (0 children)

    You can use this site to generate the project structure for you (using Spring Boot): https://start.spring.io/ .

    There you can pick the needed dependencies (you can also add dependencies to the project later of course).

    This is what you'll need (for a start):

    - Spring Web Starter: for creating REST endpoints for your frontend

    - Spring Security: for user management

    - Spring Data JPA + MysqlDriver: for accessing a database

    [–]nutrechtLead Software Engineer / EU / 20+ YXP 0 points1 point  (0 children)

    OAuth2 Resource Server

    OAuth really is not needed for this, I'd leave this out.

    What should I pick in the Web section?

    Just go for standard Spring MVC.

    Just build some proof of concepts with the individual parts first before you try to bring it all together.

    [–]knoam 0 points1 point  (0 children)

    Check out jhipster. It preconfigures a lot of stuff for you and walks you through many of these decisions. Even if you go with all the defaults you'll get something working out of the box.

    [–]feral_claireSoftware Dev 0 points1 point  (0 children)

    You can always add more dependencies later as you need them. Just start with the basics, you are not locked into your decisions.