It only takes five minutes - Quickly build SpringCloud microservices with Maven

Maven Installation Manual

If you want to learn Java engineering, high performance and distributed, in-depth. Microservices, Spring, MyBatis, Netty source code analysis of friends can add my Java advanced communication: 854630135, the group has a live Ali bull to explain the technology, as well as Java large Internet technology video free to share to everyone.

1、Prepare the installation package

  installer: ( preferablyJDK 1.7 and above)

   Integration package:

2、maven installation

   2.1 Unzip the downloaded maven installation package to the directory of your hard drive where you want to put it


   2.2 Configure environment variables

      MAVEN_HOME = H:mavenapache-maven-3.5.4

      path = %MAVEN_HOME%in;

   2.3 Verify that the installation was successful

     If you type: mvn -v in the console, you will see the maven version information, indicating a successful installation.

   2.4 Warehouse configuration

     A) Local repository path setting

     Locate the settings.xml configuration file locally in the maven installation directory under conf, mine is in H:mavenapache-maven-3.5.4confsettings.xml, find the localRepository tab of the configuration path and match the path to the maven installation as follows.

     B) Download the jar packages and other resources needed for the repository

     At the console, enter:mvn help:system, will downloadmaven requisitejar package resource。 If the following error occurs:No plugin found for prefix 'help' in the current project and in the plugin

Just change the mirror address of the maven repository to.

     After changing to the above address, then type mvn help:system command in the cmd command panel to check if it is successful, as shown below, it is both successful.

     At this point, the Maven installation is complete.

3, Eclipse integration

   By link

     A) Create two folders in the root directory of your eclipse installation: links and mavenPlugins, put the integrated jar package ( after decompressing the features and plugins folders into the mavenPlugins folder.

     B) Create a file in the links directory, and in it, configure path=pathmavenPlugins with the absolute path to

     i.e. path= path=H:\eclipse\mavenPlugins

    C) reopen eclipse, After it starts you openWindow->Preferences, If it appearsMaven options, Indicates successful integration configuration!

     Checking the maven configuration in eclipse

     turnwindow->Preferences->maven->User Setting, inspections User Setting(open file) Whether the path under is the default repository path, If so, change it to our ownsettings.xml trails:


     This concludes the configuration.

4, using Maven in eclipse to quickly build spring cloud microservices

(1) Create a new Maven project

(2) Select maven-archetype-quicktype

(3) Enter the group id, artifact id, etc. and click Finish

(4) The project is structured as shown

(5) Add spring cloud configuration to the pom file.

(6) Writing Application programs

(7) Execute the Application program, if there is no error output means spring boot has been built successfully.

If unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean appears. Then it is a jar package conflict, mine is a tomcat conflict, find the tomcat location in the local repository, the downloaded tomcat jar package can be deleted, we use their own jdk1.7.

1、Hack WeChat minigame for Android with Kotlin Jump One Jump
2、What to do to avoid secondary data destruction after losing data on your computer phone
3、Over 600 years old and 240 pages thick the mysterious Voynich manuscript has now been deciphered by artificial intelligence
4、Are drones safe Will the driver be laid off The Minister of Industry and Information Technology responds
5、Twitter hot list management cannot be trusted

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送