Spring Cloud Alibaba (2) 구축 프로젝트

57563 단어 springcloudalibaba
프로젝트 프로젝트 생 성
일반적인 프로젝트 를 만 들 면 됩 니 다. 관리 모듈 의 개발 을 책임 집 니 다.
POM
전혀 기억 하지 못 하 는 많은 것들 이 복 제 를 보면 서 자신의 수요 에 따라 고 쳐 진다.


<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0modelVersion>
    <parent>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-parentartifactId>
        <version>2.2.0.RELEASEversion>
        <relativePath/> 
    parent>

    <groupId>com.examplegroupId>
    <artifactId>hello-spring-cloud-alibaba-demoartifactId>
    <version>0.0.1-SNAPSHOTversion>
    
    <packaging>pompackaging>

    
    <properties>
        <java.version>1.8java.version>
        
        <maven.compiler.source>${java.version}maven.compiler.source>
        
        <maven.compiler.target>${java.version}maven.compiler.target>

        
        <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8project.reporting.outputEncoding>
    properties>

    
    <licenses>
        <license>
            <name>Apache 2.0name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txturl>
        license>
    licenses>
    <developers>
        <developer>
            <id>Tangid>
            <name>Tang Temname>
            <email>[email protected]email>
        developer>
    developers>

    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.funtlgroupId>
                <artifactId>hello-spring-cloud-alibaba-dependenciesartifactId>
                <version>${project.version}version>
                <type>pomtype>
                <scope>importscope>
            dependency>
        dependencies>
    dependencyManagement>


    
    <profiles>
        <profile>
            <id>defaultid>
            <activation>
                <activeByDefault>trueactiveByDefault>
            activation>

            
            <properties>
                <spring-javaformat.version>0.0.12spring-javaformat.version>
            properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.spring.javaformatgroupId>

                        
                        <artifactId>spring-javaformat-maven-pluginartifactId>
                        <version>${spring-javaformat.version}version>
                    plugin>
                    <plugin>
                        <groupId>org.apache.maven.pluginsgroupId>
                        <artifactId>maven-surefire-pluginartifactId>
                        <configuration>
                            <includes>
                                <include>**/*Tests.javainclude>
                            includes>
                            <excludes>
                                <exclude>**/Abstract*.javaexclude>
                            excludes>
                            <systemPropertyVariables>
                                <java.security.egd>file:/dev/./urandomjava.security.egd>
                                <java.awt.headless>truejava.awt.headless>
                            systemPropertyVariables>
                        configuration>
                    plugin>
                    <plugin>
                        <groupId>org.apache.maven.pluginsgroupId>
                        <artifactId>maven-enforcer-pluginartifactId>
                        <executions>
                            <execution>
                                <id>enforce-rulesid>
                                <goals>
                                    <goal>enforcegoal>
                                goals>
                                <configuration>
                                    <rules>
                                        <bannedDependencies>
                                            <excludes>
                                                <exclude>commons-logging:*:*exclude>
                                            excludes>
                                            <searchTransitive>truesearchTransitive>
                                        bannedDependencies>
                                    rules>
                                    <fail>truefail>
                                configuration>
                            execution>
                        executions>
                    plugin>
                    <plugin>
                        <groupId>org.apache.maven.pluginsgroupId>
                        <artifactId>maven-install-pluginartifactId>
                        <configuration>
                            <skip>trueskip>
                        configuration>
                    plugin>
                    <plugin>
                        <groupId>org.apache.maven.pluginsgroupId>
                        <artifactId>maven-javadoc-pluginartifactId>
                        <configuration>
                            <skip>trueskip>
                        configuration>
                        <inherited>trueinherited>
                    plugin>
                plugins>
            build>
        profile>
    profiles>

    
    <repositories>
        <repository>
            <id>spring-milestoneid>
            <name>Spring Milestonename>
            <url>https://repo.spring.io/milestoneurl>
            <snapshots>
                <enabled>falseenabled>
            snapshots>
        repository>
        <repository>
            <id>spring-snapshotid>
            <name>Spring Snapshotname>
            <url>https://repo.spring.io/snapshoturl>
            <snapshots>
                <enabled>trueenabled>
            snapshots>
        repository>
    repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestoneid>
            <name>Spring Milestonename>
            <url>https://repo.spring.io/milestoneurl>
            <snapshots>
                <enabled>falseenabled>
            snapshots>
        pluginRepository>
        <pluginRepository>
            <id>spring-snapshotid>
            <name>Spring Snapshotname>
            <url>https://repo.spring.io/snapshoturl>
            <snapshots>
                <enabled>trueenabled>
            snapshots>
        pluginRepository>
    pluginRepositories>
project>

통 일 된 의존 관리 모듈 만 들 기
단일 실행 원칙 을 실행 하기 위해 서, 우 리 는 의존 하 는 모듈 을 만 듭 니 다.
마찬가지 로 아무것도 만 들 필요 가 없습니다. pom. xml 를 설정 합 니 다. 여 기 는 정식 판 을 사용 합 니 다. 당연히 정식 판 을 사용 해 야 합 니 다. 정말 향 기 롭 습 니 다 ~
버 전 문제 주의, spring boot 버 전 짝 짓 기: spring 홈 페이지 의 짝 짓 기 alibibi 버 전 보기


<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.funtlgroupId>
    <artifactId>hello-spring-cloud-alibaba-dependenciesartifactId>
    <version>0.0.1-SNAPSHOTversion>
    <packaging>pompackaging>
    <url>http://www.funtl.comurl>

    <properties>


    properties>

    <licenses>
        <license>
            <name>Apache 2.0name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txturl>
        license>
    licenses>

    <developers>
        <developer>
            <id>Tangid>
            <name>Tang Temname>
        developer>
    developers>

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

    dependencyManagement>

    
    <repositories>
        <repository>
            <id>spring-milestoneid>
            <name>Spring Milestonename>
            <url>https://repo.spring.io/milestoneurl>
            <snapshots>
                <enabled>falseenabled>
            snapshots>
        repository>
        <repository>
            <id>spring-snapshotid>
            <name>Spring Snapshotname>
            <url>https://repo.spring.io/snapshoturl>
            <snapshots>
                <enabled>trueenabled>
            snapshots>
        repository>
    repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestoneid>
            <name>Spring Milestonename>
            <url>https://repo.spring.io/milestoneurl>
            <snapshots>
                <enabled>falseenabled>
            snapshots>
        pluginRepository>
        <pluginRepository>
            <id>spring-snapshotid>
            <name>Spring Snapshotname>
            <url>https://repo.spring.io/snapshoturl>
            <snapshots>
                <enabled>trueenabled>
            snapshots>
        pluginRepository>
    pluginRepositories>

project>
        

좋은 웹페이지 즐겨찾기