Eclipse related problem handling

maven, under the new web project, there is no resource and test directory, practice: https://blog.csdn.net/gengjianchun/article/details/78679036

  Right-click on the project --> buildPath configure Build Path --> click on the tab Libraries --> select JRE System Libraries --> click edit --> select Alternate JRE

  -->Select jdk -->Click finish, click OK, src/main/java and src/test/java appear automatically

 

When the front-end accesses the back-end, the front-end reports 404, and the back-end does not report an error. The reasons may be as follows:

  1. There is no contextPath added to the request, the default value is the project name

  2. In the configuration file of spring, when scanning the package, the controller layer is not added

 

web project, modify the Dynamic Web Module version number, from 2.3 (default) ---> 3.1

  1. Open the Navigator navigation page

  2. Under .settings, find the org.eclipse.wst.common.project.facet.core.xml file and change <installed facet="jst.web" version="2.3"/> to 3.1

  

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324900992&siteId=291194637