Implementation of creating Java Web projects using Maven in eclipse
Implementation of creating Java Web projects using Maven in eclipse
1) Right click the blank space in the eclipse project bar, and click new (or directly use Ctrl + n shortcut) - other - Maven project. @ h_502_5@
2) Select webapp template to create project @ h_ 502_ 5@
3) Fill in group ID, artifact ID and other information@ H_ 502_ 5@
groupId
Defines which group the project belongs to. For example, if your company is mycom and a project is myapp, the groupid should be com mycom. myapp.
artifacted
Defines the unique ID of the current Maven project in the group, such as myapp util, myapp domain, myapp web, etc.
version
Specifies the current version of the myapp project. Snapshot means snapshot, indicating that the project is still under development and is an unstable version.
4) After the creation, some computers will prompt that the package related to server has not been imported. We can unify this in POM Write uniformly in XML files. pom. Dependencies in XML can be found in http://mvnrepository.com/ Find it on this website. The website has helped you write the dependency in format, which is very convenient. Here is a POM I used to do hand training projects XML file.
5) Note web To enable label library and El expression support in XML, you need to use version 2.3 or above, so change the XML header
6) Src / main / Java and Src / main / resources of Maven project are the root directory of the project (classpath:). For example, if you want to access mybatis-config.xml in Src / main / resources directory, its path parameter should be written as ("mybatis-config. XML").
If you have any questions, please leave a message or go to the community of this site for exchange and discussion. Thank you for reading. I hope it can help you. Thank you for your support to this site!