155 lines
6.0 KiB
XML
155 lines
6.0 KiB
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">
|
||
<parent>
|
||
<groupId>com.ruoyi</groupId>
|
||
<artifactId>ruoyi</artifactId>
|
||
<version>3.4.0</version>
|
||
</parent>
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<artifactId>ruoyi-gateway</artifactId>
|
||
|
||
<description>
|
||
ruoyi-gateway网关模块
|
||
</description>
|
||
|
||
<dependencies>
|
||
|
||
<!-- SpringCloud Gateway -->
|
||
<dependency>
|
||
<groupId>org.springframework.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||
</dependency>
|
||
|
||
<!-- SpringCloud Alibaba Nacos -->
|
||
<dependency>
|
||
<groupId>com.alibaba.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||
</dependency>
|
||
|
||
<!-- SpringCloud Alibaba Nacos Config -->
|
||
<dependency>
|
||
<groupId>com.alibaba.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||
</dependency>
|
||
|
||
<!-- SpringCloud Alibaba Sentinel -->
|
||
<dependency>
|
||
<groupId>com.alibaba.cloud</groupId>
|
||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||
</dependency>
|
||
|
||
<!-- SpringCloud Alibaba Sentinel Gateway -->
|
||
<dependency>
|
||
<groupId>com.alibaba.cloud</groupId>
|
||
<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
|
||
</dependency>
|
||
|
||
<!-- Sentinel Datasource Nacos -->
|
||
<dependency>
|
||
<groupId>com.alibaba.csp</groupId>
|
||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||
</dependency>
|
||
|
||
<!-- SpringBoot Actuator -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||
</dependency>
|
||
|
||
<!--验证码 -->
|
||
<dependency>
|
||
<groupId>com.github.penggle</groupId>
|
||
<artifactId>kaptcha</artifactId>
|
||
</dependency>
|
||
|
||
<!-- RuoYi Common Redis-->
|
||
<dependency>
|
||
<groupId>com.ruoyi</groupId>
|
||
<artifactId>ruoyi-common-redis</artifactId>
|
||
</dependency>
|
||
|
||
<!-- Swagger -->
|
||
<dependency>
|
||
<groupId>io.springfox</groupId>
|
||
<artifactId>springfox-swagger-ui</artifactId>
|
||
<version>${swagger.fox.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>io.springfox</groupId>
|
||
<artifactId>springfox-swagger2</artifactId>
|
||
<version>${swagger.fox.version}</version>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<build>
|
||
<finalName>${project.artifactId}</finalName>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>com.google.cloud.tools</groupId>
|
||
<artifactId>jib-maven-plugin</artifactId>
|
||
<configuration>
|
||
<from>
|
||
<!--使用openjdk官方镜像,tag是8-jdk-stretch,表示镜像的操作系统是debian9,装好了jdk8-->
|
||
<image>${docker.base.jre}</image>
|
||
</from>
|
||
<to>
|
||
<!-- 如果是阿里云的容器镜像仓库,则使用容器的配置 前缀/命名空间/仓库名 -->
|
||
<image>${docker.registry}/${docker.space}/${docker.warehouse}</image>
|
||
<tags>
|
||
<!--指定包名 + 版本号即可-->
|
||
<image>${artifactId}-${version}</image>
|
||
</tags>
|
||
</to>
|
||
<!--容器相关的属性-->
|
||
<container>
|
||
<!--jvm内存参数-->
|
||
<jvmFlags>
|
||
<jvmFlag>-Xms512m</jvmFlag>
|
||
<jvmFlag>-Xmx512m</jvmFlag>
|
||
</jvmFlags>
|
||
<!--要暴露的端口-->
|
||
<ports>
|
||
<port>12080</port>
|
||
</ports>
|
||
<!--使用该参数将镜像的创建时间与系统时间一致-->
|
||
<!--<useCurrentTimestamp>true</useCurrentTimestamp>-->
|
||
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
|
||
<!--解决Could not find or load main class ${start-class} -->
|
||
<mainClass>com.ruoyi.gateway.RuoYiGatewayApplication</mainClass>
|
||
<!-- 设置时区 -->
|
||
<environment>
|
||
<TZ>Asia/Shanghai</TZ>
|
||
</environment>
|
||
</container>
|
||
<allowInsecureRegistries>true</allowInsecureRegistries>
|
||
</configuration>
|
||
<!-- 解决maven工程是父子结构的 mvn compile-->
|
||
<!-- 把 jib 绑定到 Maven 命令中-->
|
||
<executions>
|
||
<execution>
|
||
<phase>package</phase> <!-- 表示执行mvn package命令的时候就会自动构建镜像了-->
|
||
<goals>
|
||
<goal>${jib.key}</goal><!-- 表示执行的jib命令 是dockerBuild 还是build-->
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
<executions>
|
||
<execution>
|
||
<goals>
|
||
<goal>repackage</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
</project>
|