Home  >  Q&A  >  body text

java - How to achieve single-page login with Spring front-end and back-end separation?

1. Now use heml as the pure front-end, spring as the back-end, and nginx as the reverse proxy. Front-end and back-end communication is through Ajax requests. I want to control the front desk to have only one path to the login page. That is, when you directly request other pages, you can only go to the login page if you are not logged in. How to control it?

2. How to control js from being viewed

ringa_leeringa_lee2686 days ago835

reply all(1)I'll reply

  • 为情所困

    为情所困2017-06-12 09:29:32

    Put the login status in the session, and you can verify the objects in the session through filter or each request action or do

    reply
    0
  • Cancelreply