一、SpringCloud架构及技术选型

一、SpringCloud组件

一、SpringCloud架构及技术选型_第1张图片

二、SpringCloud版本选型

1. 父工程的创建
  • 删除src,使父工程只保存pom.xml,只进行版本管理;

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0modelVersion>

    <groupId>com.zte.cloudgroupId>
    <artifactId>cloud2020artifactId>
    <version>1.0-SNAPSHOTversion>
   
    
    <packaging>pompackaging>

    
    <properties>
        <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
        <maven.complier.source>1.8maven.complier.source>
        <maven.complier.target>1.8maven.complier.target>
        <junit.test>4.12junit.test>
        <log4j.version>1.2.17log4j.version>
        <lombok.version>1.16.18lombok.version>
        <mysql.version>5.1.47mysql.version>
        <druid.version>1.1.16druid.version>
        <mybatis.spring.boot.version>1.3.0mybatis.spring.boot.version>
    properties>

    
    <dependencyManagement>
        <dependencies>
            
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-dependenciesartifactId>
                <version>2.2.2.RELEASEversion>
                <type>pomtype>
                <scope>importscope>
            dependency>

            
            <dependency>
                <groupId>org.springframework.cloudgroupId>
                <artifactId>spring-cloud-dependenciesartifactId>
                <version>Hoxton.SR1version>
                <type>pomtype>
                <scope>importscope>
            dependency>

            
            <dependency>
                <groupId>com.alibaba.cloudgroupId>
                <artifactId>spring-cloud-alibaba-dependenciesartifactId>
                <version>2.1.0.RELEASEversion>
                <type>pomtype>
                <scope>importscope>
            dependency>

            
            <dependency>
                <groupId>mysqlgroupId>
                <artifactId>mysql-connector-javaartifactId>
                <version>${mysql.version}version>
                <scope>runtimescope>
            dependency>

            
            <dependency>
                <groupId>com.alibabagroupId>
                <artifactId>druid-spring-boot-starterartifactId>
                <version>1.1.16version>
                <scope>runtimescope>
            dependency>

            
            <dependency>
                <groupId>org.mybatis.spring.bootgroupId>
                <artifactId>mybatis-spring-boot-starterartifactId>
                <version>${mybatis.spring.boot.version}version>
            dependency>

            
            <dependency>
                <groupId>junitgroupId>
                <artifactId>junitartifactId>
                <version>${junit.version}version>
            dependency>

            
            <dependency>
                <groupId>log4jgroupId>
                <artifactId>log4jartifactId>
                <version>${log4j.version}version>
            dependency>

        dependencies>
    dependencyManagement>

		<build>
		     
		     
	         
	        <resources>
	            
	            <resource>
	                <directory>src/main/javadirectory>
	                <includes>
	                    <include>**/*.xmlinclude>
	                includes>
	                <filtering>falsefiltering>
	            resource>
	        resources>
	     
		    <plugins>
		        
		        <plugin>
		            <groupId>org.apache.maven.pluginsgroupId>
		            <artifactId>maven-compiler-pluginartifactId>
		            <version>2.3.2version>
		            <configuration>
		                <source>1.8source>
		                <target>1.8target>
		            configuration>
		        plugin>
		    plugins>
		build>

project>

你可能感兴趣的:(4.3,SpringCloud)