Skip to content
Advertisement

Java Spring and Existing HTML site

I have established connection between my Spring project and MySQL DB, I also have an existing HTML site with login and register templates. Can someone point me into the right direction on how to connect Spring with my existing HTML?

Advertisement

Answer

In order to implement login and register workflow you need to implement few things:

  1. REST API http endpoints for login and register – you can use Spring for that
  2. Data base of some sort to to store users data (that should be encrypted) – you can use MySQL for that
  3. Some sort of mechanism to authenticate users – I recommend using JWT for that

Considering your tech stack, which include Spring (I guess it is Spring Boot), and MySQL I can suggest going through this great article which walks you through building login workflow using Spring boot, MySQL and JWT

I can also recommend using existing technology for managing user data, specifically I recommend KeyCloak which is a Open Source Identity and Access Management.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement