STS builds springMVC framework (3)

3. Create a springMVC project

  1. New

    new --> other -->spring -->spring legacy project   点击next

     

 

    

    Click next

 

      

      

 

    Click Finish and wait for the loading to complete.

    Because the corresponding jar package is not imported locally, the project will have some errors.

    You can continue: right-click on the item

     

 

  2. Publish the project

     1, tomcat server creation and server.xml configuration modification

      window -->show view --> Servers Open the Servers window

      In the Servers window, right-click new --> Server --> Apache --> Tomcat v8.5 Server and click Finish

      Double-click the newly created Server in the Servers window, and in the pop-up window, modify and save the Server Locations configuration

      

      Right-click on Server and select Add And Remove 

      

 

      Add the project to the Configured box via the Add button and click Finish.

      Start tomcat and the project can be accessed normally.

      

 

      However, the console has a warning 

      [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpringMain' did not find a matching property.

      

 

       Modify the server.xml file

      

      

      

    Restart tomcat and it's ok

 

 

 

      

Guess you like

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