A little understanding of IDEA project path

        This semester, Intellj IDEA has been basically used as the IDE for learning and development. To be honest, this IDE is much easier to use than MyEclipse, and the integration is very high. However, there are always some inconveniences when using Tomcat. The following are My personal understanding of it

        Deploying a project when developing with ME is to copy all the structure and files of the entire project to the server directory. When accessing through a browser test, you must add the project name and corresponding path after localhost:8080 to access the corresponding page.

        But IDEA is different. Its default deployment method is to use the project itself as a virtual path of the server (personal understanding), compile it under the project folder, and put the compiled project in the out folder, which is accessed by default. The project adds a path after localhost:8080, that is, the context path after deployment is a simple "/". Although this looks very convenient and concise, it will also bring some troubles, such as the path problem when using the file upload function, and for example Use plugins such as UEditor's project path configuration problem in the previous blog post. If the access path has no project name, the project path configuration of UEditor must also be "/ueditor/". In addition, if multiple projects are developed at the same time, for example, when A project needs to refer to B, this access method will cause a variety of inconveniences.

        So now it has become a habit, even if you use IDEA to develop, you will modify the output path of the project to the server directory, and modify the project context path to the project name, which is convenient for your own use and comfortable to watch.

        It is also possible that with the growth of your own learning and development experience, you will realize that this kind of thinking is naive or stupid. After all, IDEA definitely has its own reason for adopting such a method, and I am only a developer who has not graduated from kindergarten. White. But in order to adapt to the current stage of learning and the skills that have been mastered, it is more convenient to use this method now.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326800513&siteId=291194637