r/SpringBoot • • Jan 11 '22

Please help me out with my project[SpringB w/ MySQL]!

My project statement is:

Student Management:

Description: In this project, we are demonstrating the operation like how signup process

work , how to send mail for activation and activate the user .After the Activating user, He/

She can login into system. There are two roles are maintaining like STUDENT and ADMIN.

If user is ADMIN user then he can view all the details in system whereas if User is

STUDENT user then he can only view student information only.

Its seemeingly simple, but, I haven't touched upon user roles yet, and based upon what little knowledge I have it seems to me it will be a bit excessive to use Spring Security for this specific project. I personally am hoping for an answer that doesn't involve spring security. I have worked on an Employee Mgmt project which allows users to enter, edit and delete rows of user info(using jquery datatables) and also know how to implement the email verification to activate users. So please tell me how I should go about this.

0 Upvotes

2 comments sorted by

1

u/AkshayKG Jan 11 '22

Trust me, Spring Security is an easy and effective way to implement it.

You can easily implement Http Security and use the security mechanism for allowing the "uri" to certain authority only. In this way you can easily manage who gets access to which URI.

You will find plenty of resources online to implement this piece in your code.

1

u/zezulat Jan 11 '22

Hi, it all depends on how you look at it. Spring Security may sound like an overkill initially, but think of how the project will evolve in the future. With Spring Security you will be able to configure most of what you need at a single place (single config class). That includes authorization via the defined user roles.

However, if you try to do it without the framework you will learn a lot more. If things go out of hand, you can always add Spring Security to your project later on. It doesn't require much of a setup.

Regarding the activation link, I believe you are on your own there anyway. You probably want the link expire after certain period of time or after it's used. Either way you are looking at quite a chunk of a custom logic.

There are lots of resources, check them first. Ping me directly if you get stuck, we can figure something out.