1.项目需求
Currently, the company is launching a new project and hopes to use vuejs2 as the front-end framework, the ssm framework as the backend, and the web container as tomcat. The system is an internal business system with a small number of users and the concurrency will not exceed 100. During the development process, it is hoped that the front and backend can be separated.
2.目前工作
Currently, the vue-cli tool is used to generate the vue front-end project, and webpack is used for packaging. Webpack-dev-server is used as the debugging server, and the front and backend are developed separately. During the development process, user session management encountered certain problems. Webpack-dev-server needs to manually take over the session data sent back by the background server. This is not very convenient. I would like to ask if there is any solution.
3. 问题
Post-deployment is to deploy the front-end page on nginx or node server, and all businesses call the java background interface through services. Or package the front-end project and deploy it uniformly in the tomcat container.
I hope all the great masters will give you some advice.
Since the front-end and back-end are separated, don’t use session. You can use jwt and the like. Don’t put the front-end page in tomcat
Of course, this is a situation where the front and back ends are developed separately. Otherwise, you can do whatever you like
It is recommended to use docker for deployment