Build a maven-spring-spring MVC-MYBATIS-MYSSQ integrated SSM framework

Source: Internet
Author: User
Tags unique id

1 Preparation of the database

I do not have MySQL locally, fully refer to http://jingyan.baidu.com/article/f3ad7d0ffc061a09c3345bf0.html installed one.

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/8C/CD/wKiom1h4dryzONoLAACjxwaKJ_Q365.png "title=" _ 20170113144137.png "alt=" Wkiom1h4dryzonolaacjxwakj_q365.png "/>

2 Installing MAVEN locally

First of all, what does maven do? The blog I study said that MAVEN is managing the jar package, before we have to work hard to find the jar, but also worry about version mismatch and so on, with Maven, he can help us manage the jar package you need. I think this explanation is easy to understand, and the official argument is that MAVEN is a project management and building automation tool. We are more concerned with his project building capabilities, and Maven requires that all projects have the following structure before they are customized:

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/8C/C9/wKioL1h4fHyRCdhYAABSpgJP8xs962.png "title=" _ 20170113144137.png "alt=" Wkiol1h4fhyrcdhyaabspgjp8xs962.png "/>

Since I have added maven support locally, here's the next step. The follow-up will be added when I add it myself , you can refer to http://503431920.blog.51cto.com/6681280/1695929 or http://blog.csdn.net/ donggua3694857/article/details/51638598.

3 new MAVEN Project

It's best to open a new workspace, the first time I've created it in a saved workspace, and I don't know why Java project was created, not Web project.


650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/8C/CA/wKioL1h4g4-xWU6JAAAvedIZ9co064.png "style=" float : none; "title=" _20170113144137.png "alt=" Wkiol1h4g4-xwu6jaaavediz9co064.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/8C/CD/wKiom1h4g5DwVOtUAACuKoIldTY646.png "style=" float : none; "title=" 2.png "alt=" Wkiom1h4g5dwvotuaacukoildty646.png "/>

Here we have not selected create a simple project, which may be related to maven building modularity, I will follow up on the time to update

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/8C/CA/wKioL1h4g5GwVXSVAADidZ1YFH4521.png "style=" float : none; "title=" 3.png "alt=" Wkiol1h4g5gwvxsvaadidz1yfh4521.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/8C/CA/wKioL1h4g5KBMIvCAAClwRUPpq8046.png "style=" float : none; "title=" 4.png "alt=" Wkiol1h4g5kbmivcaaclwruppq8046.png "/>

The GroupID property is the unique ID of an organization or project (such as an open source project), which is what we usually start with.

The Artifactid property is the name of the project you are building.

The Version property is the project's revision, which is generally a good default.

There is also a packaging, the first step in creating a project if create a simple project is checked to see other options, now defaults to US setting this property value to war.

The following is the resulting file directory.

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/8C/CF/wKiom1h4lD-w0ZmHAAArQvd-q7k314.png "title=" 3.png "alt=" Wkiom1h4ld-w0zmhaaarqvd-q7k314.png "/>

Add the following servlet dependency, the error will not be

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/8C/CF/wKiom1h4lgTzKzaQAACNWbSyB94156.png "title=" 4.png "alt=" Wkiom1h4lgtzkzaqaacnwbsyb94156.png "/>

Configure Jetty

The first time is so matching, but do not know why not to use ...

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8C/CF/wKiom1h4lkrxjGKiAAAmsOwza8c689.png "title=" 1.png "alt=" Wkiom1h4lkrxjgkiaaamsowza8c689.png "/>

The above later changed to the following easy to use, the specific configuration has yet to be studied

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/8C/D0/wKiom1h4pMLDeIhgAABiKRiyOhs749.png "title=" 1.png "alt=" Wkiom1h4pmldeihgaabikriyohs749.png "/>

4 Configure server, run

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8C/CF/wKiom1h4mHLjJOEFAABOL5B_-QA014.png "title=" 1.png "alt=" Wkiom1h4mhljjoefaabol5b_-qa014.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/8C/CB/wKioL1h4mS7RADIyAAFkjc5t-Gc135.png "title=" 1.png "alt=" Wkiol1h4ms7radiyaafkjc5t-gc135.png "/>

Note that the setting.xml here is best to customize one, which is not good to use the default. At the same time setting.xml the definition of the M2 also to customize the path, which is used to download the Jar Package folder.

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8C/CF/wKiom1h4mcWxh7SpAACc0dLT8Us684.png "style=" float : none; "title=" 1.png "alt=" Wkiom1h4mcwxh7spaacc0dlt8us684.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/8C/CB/wKioL1h4mcagG8qCAACnGTx9wMk536.png "style=" float : none; "title=" 2.png "alt=" Wkiol1h4mcagg8qcaacngtx9wmk536.png "/>

Clicking Run as->maven Install will download a lot of jar packages and the last build succeeds.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8C/CF/wKiom1h4moGziMn8AACdPPnCPsQ552.png "title=" 1.png " alt= "Wkiom1h4mogzimn8aacdppncpsq552.png"/>

Click Run to start the server

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/8C/CC/wKioL1h4m6jTmLCKAAEsahmZ4i0348.png "title=" 1.png "alt=" Wkiol1h4m6jtmlckaaesahmz4i0348.png "/>


Run successfully! Small excitement ~ Please look forward to continuing the update.

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/8C/CC/wKioL1h4o2ahDATCAAAi3izTMBs632.png "title=" 1.png "alt=" Wkiol1h4o2ahdatcaaai3iztmbs632.png "/>

This article from the "12464580" blog, reproduced please contact the author!

Build a maven-spring-spring MVC-MYBATIS-MYSSQ integrated SSM framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.