151 lines
6.0 KiB
XML
151 lines
6.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<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">
|
||
<parent>
|
||
<artifactId>zyjblogs-cloud-dependencies</artifactId>
|
||
<groupId>cn.zyjblogs</groupId>
|
||
<version>1.0.0</version>
|
||
<relativePath/>
|
||
</parent>
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<groupId>cn.zyjblogs.pubilc</groupId>
|
||
<artifactId>zyjblogs-gateway</artifactId>
|
||
<version>${project.release.version}</version>
|
||
|
||
<properties>
|
||
<maven.compiler.source>15</maven.compiler.source>
|
||
<maven.compiler.target>15</maven.compiler.target>
|
||
<!--编译编码-->
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
<!-- 加入sentinel-->
|
||
<dependency>
|
||
<groupId>com.alibaba.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||
</dependency>
|
||
|
||
<!-- 加入actuator -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.apache.commons</groupId>
|
||
<artifactId>commons-pool2</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<artifactId>zyjblogs-common-spring-boot-starter</artifactId>
|
||
<groupId>cn.zyjblogs.starter</groupId>
|
||
<exclusions>
|
||
<exclusion>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-web</artifactId>
|
||
</exclusion>
|
||
</exclusions>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>cn.zyjblogs.starter</groupId>
|
||
<artifactId>zyjblogs-redis-spring-boot-starter</artifactId>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||
</dependency>
|
||
<!-- 网关 配置 -->
|
||
<dependency>
|
||
<groupId>org.springframework.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||
</dependency>
|
||
<!--sentinel持久化存储-->
|
||
<dependency>
|
||
<groupId>com.alibaba.csp</groupId>
|
||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||
</dependency>
|
||
<!-- knife4j文档 -->
|
||
<dependency>
|
||
<groupId>com.github.xiaoymin</groupId>
|
||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>javax.servlet</groupId>
|
||
<artifactId>javax.servlet-api</artifactId>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<version>${maven-jar-plugin.version}</version>
|
||
<configuration>
|
||
<archive>
|
||
<manifest>
|
||
<!--启动类 such as: com.test.StartApp-->
|
||
<mainClass>cn.zyjblogs.GatewayApplication</mainClass>
|
||
<!-- 把所依赖的 jar 包写入 manifest -->
|
||
<addClasspath>true</addClasspath>
|
||
<!--定义依赖jar包的相对路径(相对项目jar包)-->
|
||
<classpathPrefix>lib/</classpathPrefix>
|
||
<useUniqueVersions>false</useUniqueVersions>
|
||
</manifest>
|
||
<manifestEntries>
|
||
<!--MANIFEST.MF 中 Class-Path 加入资源文件目录-->
|
||
<!--定义静态资源的相对路径(相对项目jar包)-->
|
||
<Class-Path>config/${project.artifactId}/.</Class-Path>
|
||
</manifestEntries>
|
||
</archive>
|
||
<includes>
|
||
<!-- 当前项目的 jar 包内排除静态资源 -->
|
||
<include>**/*.class</include>
|
||
</includes>
|
||
</configuration>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<version>${maven-assembly-plugin.version}</version>
|
||
<configuration>
|
||
<appendAssemblyId>false</appendAssemblyId>
|
||
<descriptors>
|
||
<!--assembly配置文件的相对路径-->
|
||
<descriptor>bin/assembly.xml</descriptor>
|
||
</descriptors>
|
||
<!--assembly打包后的输出位置-->
|
||
<outputDirectory>target</outputDirectory>
|
||
</configuration>
|
||
<executions>
|
||
<execution>
|
||
<id>make-assembly</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>single</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<configuration>
|
||
<source>15</source>
|
||
<target>15</target>
|
||
</configuration>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
</project> |