Getting started with the SI series to build the Maven Spring MVC project, mavenmvc

Source: Internet
Author: User
Tags maven central

Getting started with the SI series to build the Maven Spring MVC project, mavenmvc

Getting started with the SI series to build a Maven Spring MVC Project

Beautiful Life of the sun and fire god (http://blog.csdn.net/opengl_es)

This article follows the "signature-non-commercial use-consistency" creation public agreement

Reprinted please keep this sentence: Sun huoshen's beautiful life-this blog focuses on Agile development and mobile and IOT device research: iOS, Android, Html5, Arduino, pcDuino, otherwise, this blog post is rejected or reprinted. Thank you for your cooperation.



Getting started with the SI series to build Spring MVC Projects


Only one word is different from the title, Maven or not. In fact, I like Gradle better. It uses the Maven Central Library, but it is indeed Groovy, and XML is not messy.

In addition, it is always unsuccessful to use Maven to build a Spring Boot project (at that time, it was not forced to break down the road and didn't think about the image, so I had to use the wall-turning software that couldn't turn over the wall to get rid of myself:> ), the use of Gradle is much more likely to succeed, so it should be said that it is not successful yet. Let's try again later.


As for Spring Boot, as a microframework (microservice), it is also widely used in Distributed cluster services. This will be discussed later. As for Distributed Transaction synchronization, this problem is also discussed.


......


1. Maven image Configuration:

When talking about Maven, in "home", you must first solve the image problem, that is, the image of the Maven center library in China. Otherwise, when you build a Maven project, you may encounter N + X problems, which may lead to confusion, even if there are successful cases and tutorials for others.

<?xml version="1.0" encoding="UTF-8"?><!--Licensed to the Apache Software Foundation (ASF) under oneor more contributor license agreements.  See the NOTICE filedistributed with this work for additional informationregarding copyright ownership.  The ASF licenses this fileto you under the Apache License, Version 2.0 (the"License"); you may not use this file except in compliancewith the License.  You may obtain a copy of the License at    http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing,software distributed under the License is distributed on an"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANYKIND, either express or implied.  See the License for thespecific language governing permissions and limitationsunder the License.--><!-- | This is the configuration file for Maven. It can be specified at two levels: | |  1. User Level. This settings.xml file provides configuration for a single user, |                 and is normally provided in ${user.home}/.m2/settings.xml. | |                 NOTE: This location can be overridden with the CLI option: | |                 -s /path/to/user/settings.xml | |  2. Global Level. This settings.xml file provides configuration for all Maven |                 users on a machine (assuming they're all using the same Maven |                 installation). It's normally provided in |                 ${maven.home}/conf/settings.xml. | |                 NOTE: This location can be overridden with the CLI option: | |                 -gs /path/to/global/settings.xml | | The sections in this sample file are intended to give you a running start at | getting the most out of your Maven installation. Where appropriate, the default | values (values used when the setting is not specified) are provided. | |--><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">  <!-- localRepository   | The path to the local repository maven will use to store artifacts.   |   | Default: ${user.home}/.m2/repository  <localRepository>/path/to/local/repo</localRepository>  -->  <localRepository>E:/DevTools/JavaWeb/MavenRepo/repo/m2/</localRepository>  <!-- interactiveMode   | This will determine whether maven prompts you when it needs input. If set to false,   | maven will use a sensible default value, perhaps based on some other setting, for   | the parameter in question.   |   | Default: true  <interactiveMode>true</interactiveMode>  -->  <!-- offline   | Determines whether maven should attempt to connect to the network when executing a build.   | This will have an effect on artifact downloads, artifact deployment, and others.   |   | Default: false  <offline>false</offline>  -->  <!-- pluginGroups   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.   |-->  <pluginGroups>    <!-- pluginGroup     | Specifies a further group identifier to use for plugin lookup.    <pluginGroup>com.your.plugins</pluginGroup>    -->  </pluginGroups>  <!-- proxies   | This is a list of proxies which can be used on this machine to connect to the network.   | Unless otherwise specified (by system property or command-line switch), the first proxy   | specification in this list marked as active will be used.   |-->  <proxies>    <!-- proxy     | Specification for one proxy, to be used in connecting to the network.     |    <proxy>      <id>optional</id>      <active>true</active>      <protocol>http</protocol>      <username>proxyuser</username>      <password>proxypass</password>      


If you want to build your own local Maven repository, you can refer to the following address:

WEBX3 learning-configure Maven Repository Manager with Nexus


2. Spring MVC configuration and dependency configuration in POM


The following error occurs during the context menu Maven> Update Project:

The following error occurs: Plugin org. apache. maven. plugins: maven-resources-plugin: 2.6 or one of its dependencies cocould not be resolved


Solution:

Add the dependency in POM as follows:

<dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>3.8.1</version><scope>test</scope></dependency><dependency><groupId>org.apache.maven.plugins</groupId><artifactId>maven-resources-plugin</artifactId><version>2.4.3</version></dependency></dependencies>


Uncomfortable. This paragraph is to be continued...





Follow-up:

Configure MyBatis in POM and related configurations

MySql Workbench Design Database

Use the automatic MyBatis Generation Tool

MyBatis completes the read/write splitting of the MySql Master/Slave database through Spring's aspect transaction processing.



A lot of things I have not been eager to do yet. I love playing a technical role in my life. Let me do it for another 20 years. I don't have enough skills to do ......

Maybe, it's really a sudden increase in smoking cessation and discomfort. To tell the truth, it's just because you're sick and can't smoke. You don't smoke, you don't really quit, and you never want to smoke!

If you have persisted for a month, you don't have to stick to it. Just like the book that taught you to quit smoking, you don't want to smoke, but you don't dare to quit after you quit smoking, this includes:

What does smoking cessation do to your health?

What are troubles after smoking cessation?

"Quit smoking... What should I do?


In fact, I do not know what to do now. Although I still keep the habit of smoking before, I will immediately find water and fruit to eat, satisfying all the needs from the mouth to the stomach, I do not want to smoke now.

Another thing that may be really important is that you have to take your health as the most important thing, such as not being upset, angry, or entangled, which will affect your health, and it is very straightforward. If you think so,

And clearly and clearly know that this is not a false thing. Then, you will not really be entangled in these things, and it will become easy to let go, especially when you get off work, put down your work, eat, eat, and eat, and properly!


In the past, it seems necessary to make preparations before smoking cessation.

However, smoking cessation does not rely on these ideas, beliefs, and willpower!


I hope I can survive. It will be okay after two months of review. Oh, it will be a month later!



Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger. Reprinted and contacted QQ 30952589. Add a friend to indicate your intention.

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.