Springboot配置<profiles>标签和application-{profile}.yml文件编写配置注意事项

本文详细介绍了SpringBoot中如何通过配置标签实现不同环境(如测试、预发、生产)的动态配置切换,包括pom文件配置及yml文件的具体写法,并解决了在配置过程中遇到的常见问题。

一、springboot配置介绍
1、使用此标签的目的
为了区分配置文件的不同环境,我们在开发的过程中会遇到测试环境、预发环境和生产环境,如果频繁的改动配置文件代码或名称容易发生不必要的错误,所以通过配置标签来实现简易的动态配置,只需改动spring.profiles.active的key值对应的value(test,pre or product)即可实现对应配置文件的切换。
2、具体配置步骤:
(1)pom文件配置:

<profiles>
        <profile>
            <id>product</id>
            <properties>
                <env>product</env>
            </properties>
        </profile>

        <profile>
            <id>pre</id>
            <properties>
                <env>pre</env>
            </properties>
        </profile>

        <profile>
            <id>test</id>
            <properties>
                <env>test</env>
            </properties>
        </profile>
    </profiles>

(2)配置properties、xml、yml或yaml任何一种格式的文件
我采用的是yml文件,Springboot默认会加载application.yml文件,具体启动规则可以参考:https://blog.youkuaiyun.com/chengkui1990/article/details/79866499
在这里插入图片描述
根据启动的规则我们可以在application.yml中配置具体访问哪个配置文件
写法如下:
在这里插入图片描述
通过上图的配置就可以找到对应的application-{profiile}.yml文件,我们也可以怎么写

在这里插入图片描述
@env@是获取maven控制管理配置的值,如下图
在这里插入图片描述
我们只要切换maven中的profiles对选框,就可以实现配置文件的切换
**注意:**我在实际开发的过程中发现如果是多模块项目配置在某个模块下可能会不生效,后切换至maven多模块的跟目录就生效了,具体原因未知。spring.profiles.active的值在测试环境可以用变量’@env@'的形式,通过maven模块动态设置,但是到了生产环境必须写死-product或online。
二、启动Springboot的时候,遇到yml配置的问题

在这里插入图片描述
上面文件存在两个问题:
第一个问题:yml文件配置的时候不能用JSON,会造成不能正常加载配置不能识别${redis.conf.engine}中的redis.conf.engine异常
第二个问题:在写key值时可以不用怎么多层级,可以用redis.conf:的方式,减少层级,编译查看,写法如下:
在这里插入图片描述
yml文件格式相关的小介绍:https://www.jianshu.com/p/a8252bf2a63d

以上是自己在搭建Springboot项目的时候想动态配置文件时遇到的问题,查看了一些资料和自己的实际实践进行的总结,相关引用如果有侵权行为,请告知我会尽快删除,谢谢!

<profiles> <profile> <id>prod</id> <properties> <spring.profiles.active>prod</spring.profiles.active> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <excludes> <exclude>application.yml</exclude> </excludes> </configuration> </plugin> </plugins> </build> </profile> <profile> <id>dev</id> <properties> <spring.profiles.active>dev</spring.profiles.active> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <executable>true</executable> <classifier>web-exec</classifier> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <excludes> <exclude>application.yml</exclude> </excludes> </configuration> </plugin> </plugins> </build> </profile> <profile> <id>test</id> <properties> <spring.profiles.active>test</spring.profiles.active> </properties> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <executable>true</executable> <classifier>web-exec</classifier> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <excludes> <exclude>application.yml</exclude> </excludes> </configuration> </plugin> </plugins> </build> </profile> </profiles> 可以优化一下吗
10-31
现在我将给你个子服务依赖,一个是父项目的依赖文件,帮我看一下为啥我子服务还需要配置数据库才能启动 子服务依赖<?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"> <modelVersion>4.0.0</modelVersion> <groupId>com.picc.xzpt.ai</groupId> <artifactId>piccxzpt_ai</artifactId> <version>0.0.1</version> <packaging>jar</packaging> <parent> <groupId>com.picc.xzpt</groupId> <artifactId>piccxzpt</artifactId> <version>0.0.1</version> <relativePath>../pom.xml</relativePath> </parent> <dependencies> <dependency> <groupId>com.bes.appserver</groupId> <artifactId>bes-lite-spring-boot-2.x-starter</artifactId> <version>9.5.5.013</version> </dependency> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>swagger-bootstrap-ui</artifactId> <version>1.9.3</version> </dependency> <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <!-- <version>3.0.4</version>--> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${guava.version}</version> </dependency> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>3.22.0</version> <scope>compile</scope> </dependency> <!-- <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> <version>2.8.0</version> </dependency>--> <!-- <dependency>--> <!-- <groupId>org.mybatis.spring.boot</groupId>--> <!-- <artifactId>mybatis-spring-boot-starter</artifactId>--> <!-- <version>1.3.1</version>--> <!-- <exclusions>--> <!-- <exclusion>--> <!-- <groupId>ch.qos.logback</groupId>--> <!-- <artifactId>logback-classic</artifactId>--> <!-- </exclusion>--> <!-- <exclusion>--> <!-- <groupId>org.mybatis</groupId>--> <!-- <artifactId>mybatis</artifactId>--> <!-- </exclusion>--> <!-- </exclusions>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>org.mybatis</groupId>--> <!-- <artifactId>mybatis</artifactId>--> <!-- <version>3.5.6</version>--> <!-- </dependency>--> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.13</version> </dependency> <!--基础库--> <dependency> <groupId>com.picc.xzpt.baselib</groupId> <artifactId>piccxzpt_baselib</artifactId> <version>0.0.75</version> <exclusions> <exclusion> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> </exclusion> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> <!-- 添加以下排除项 --> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </exclusion> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.14</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.3.2</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!-- 热部署启动 --> <fork>true</fork> </configuration> </plugin> <!-- <plugin>--> <!-- <groupId>org.mybatis.generator</groupId>--> <!-- <artifactId>mybatis-generator-maven-plugin</artifactId>--> <!-- <version>1.3.5</version>--> <!-- <configuration>--> <!-- <!– generator 工具配置文件的位置 –>--> <!-- <configurationFile>src/main/resources/xml/generatorConfig.xml</configurationFile>--> <!-- <verbose>true</verbose>--> <!-- <overwrite>true</overwrite>--> <!-- </configuration>--> <!-- <dependencies>--> <!-- <!– oracle –>--> <!-- <dependency>--> <!-- <groupId>com.ibm.informix</groupId>--> <!-- <artifactId>jdbc</artifactId>--> <!-- <version>4.10.8.1</version>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>org.mybatis.generator</groupId>--> <!-- <artifactId>mybatis-generator-core</artifactId>--> <!-- <version>1.3.5</version>--> <!-- </dependency>--> <!-- </dependencies>--> <!-- </plugin>--> </plugins> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory>src/main/resources</directory> </resource> </resources> </build> </project> 父项目依赖 <groupId>com.picc.xzpt</groupId> <artifactId>piccxzpt</artifactId> <packaging>pom</packaging> <version>0.0.1</version> <!-- <parent>--> <!-- <groupId>org.springframework.boot</groupId>--> <!-- <artifactId>spring-boot-starter-parent</artifactId>--> <!-- <version>2.5.15</version>--> <!-- <relativePath/>--> <!-- </parent>--> <parent> <groupId>pdfc</groupId> <artifactId>pdfc-parent</artifactId> <version>4.2.8.4</version> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <!-- <spring-cloud.version>2020.0.5</spring-cloud.version>--> <pdfc.version>4.2.8.4</pdfc.version> </properties> <dependencies> <!-- Web类型 --> <dependency> <groupId>pdfc</groupId> <artifactId>pdfc-web</artifactId> <version>${pdfc.version}</version> <exclusions> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> </exclusion> <exclusion> <groupId>com.squareup.okio</groupId> <artifactId>okio</artifactId> </exclusion> <exclusion> <groupId>com.squareup.okio</groupId> <artifactId>okio-jvm</artifactId> </exclusion> <exclusion> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk18on</artifactId> </exclusion> <exclusion> <groupId>org.bouncycastle</groupId> <artifactId>bcpkix-jdk18on</artifactId> </exclusion> <exclusion> <groupId> org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> </exclusion> <exclusion> <groupId> org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> </exclusion> <exclusion> <groupId>io.github.classgraph</groupId> <artifactId>classgraph</artifactId> </exclusion> <exclusion> <groupId>org.owasp.antisamy</groupId> <artifactId>antisamy</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.squareup.okio</groupId> <artifactId>okio</artifactId> <version>3.4.0</version> </dependency> <dependency> <groupId>com.squareup.okio</groupId> <artifactId>okio-jvm</artifactId> <version>3.4.0</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk18on</artifactId> <version>1.78.1</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcpkix-jdk18on</artifactId> <version>1.78.1</version> </dependency> <dependency> <groupId>io.github.classgraph</groupId> <artifactId>classgraph</artifactId> <version>4.8.112</version> </dependency> <dependency> <groupId>org.owasp.antisamy</groupId> <artifactId>antisamy</artifactId> <version>1.7.5</version> </dependency> <!-- 微服务应用 --> <dependency> <groupId>pdfc</groupId> <artifactId>pdfc-cloud</artifactId> <version>${pdfc.version}</version> <exclusions> <exclusion> <artifactId>pdfc-config</artifactId> <groupId>pdfc</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.thoughtworks.xstream</groupId> <artifactId>xstream</artifactId> <version>1.4.20</version> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.1</version> <exclusions> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> </exclusion> <exclusion> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.5.6</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.13</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> <!-- <version>2.5.15</version>--> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-discovery</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> <!-- 热更新 开始 --> <!--<dependency>--> <!--<groupId>org.springframework.boot</groupId>--> <!--<artifactId>spring-boot-devtools</artifactId>--> <!--</dependency>--> <!-- 热更新 结束--> <!--sswagger2开始--> <!-- <dependency>--> <!-- <groupId>io.springfox</groupId>--> <!-- <artifactId>springfox-swagger2</artifactId>--> <!-- <version>2.9.2</version>--> <!-- <exclusions>--> <!-- <exclusion>--> <!-- <groupId>com.google.guava</groupId>--> <!-- <artifactId>guava</artifactId>--> <!-- </exclusion>--> <!-- </exclusions>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>com.google.guava</groupId>--> <!-- <artifactId>guava</artifactId>--> <!-- <version>32.0.1-android</version>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>io.springfox</groupId>--> <!-- <artifactId>springfox-swagger-ui</artifactId>--> <!-- <version>2.10.0</version>--> <!-- </dependency>--> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>swagger-bootstrap-ui</artifactId> <version>1.9.3</version> </dependency> <!--sswagger2结束--> <!--缓存方案--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!--缓存方案结束--> <!-- 加密的依赖 开始--> <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> </dependency> <!-- 加密的依赖 结束--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> </exclusion> <exclusion> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> <version>9.0.86</version> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> <version>9.0.90</version> </dependency> <!-- 链路追踪 --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-sleuth</artifactId> </dependency> <dependency> <groupId>net.logstash.logback</groupId> <artifactId>logstash-logback-encoder</artifactId> <version>4.11</version> <exclusions> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> </exclusion> <exclusion> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.12.7.2</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.2.13</version> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> <version>2.4.1</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.2.4</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>4.1.1</version> </dependency> <dependency> <groupId>com.sun.mail</groupId> <artifactId>javax.mail</artifactId> <version>1.6.2</version> </dependency> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> </dependency> <dependency> <groupId>com.ibm.informix</groupId> <artifactId>jdbc</artifactId> <version>4.10.8.1</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.83</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.5</version> </dependency> <!--基础库--> <dependency> <groupId>com.picc.xzpt.baselib</groupId> <artifactId>piccxzpt_baselib</artifactId> <version>0.0.97</version> <exclusions> <exclusion> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> </exclusion> <exclusion> <groupId>org.apache.tika</groupId> <artifactId>tika-core</artifactId> </exclusion> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.tika</groupId> <artifactId>tika-core</artifactId> <version>1.28.4</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-text</artifactId> <version>1.10.0</version> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.12.2</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.3.2</version> </dependency> <!-- https://mvnrepository.com/artifact/org.owasp.esapi/esapi --> <dependency> <groupId>org.owasp.esapi</groupId> <artifactId>esapi</artifactId> <version>2.5.3.0</version> <exclusions> <exclusion> <groupId>org.owasp.antisamy</groupId> <artifactId>antisamy</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
最新发布
11-19
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.5.3</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.ramaxel</groupId> <artifactId>assets-infrastructure-service</artifactId> <version>1.0.0-RELEASE</version> <name>assets-infrastructure-service</name> <description>infrastructure-service project for Spring Boot</description> <properties> <java.version>1.8</java.version> <skipTests>true</skipTests> <common.base.version>1.0.0-RELEASE</common.base.version> <common.database.version>1.0.0-RELEASE</common.database.version> <common.jwt-login.version>1.0.0-RELEASE</common.jwt-login.version> <common.xxl-job.version>1.0.0-RELEASE</common.xxl-job.version> <common.log-operation.version>1.0.0-RELEASE</common.log-operation.version> <common.log-request.version>1.0.0-RELEASE</common.log-request.version> <common.redis.version>1.0.0-RELEASE</common.redis.version> <java.mail.version>1.4.7</java.mail.version> <spring.cloud.version>2020.0.4</spring.cloud.version> <spring.cloud.alibaba.version>2.2.2.RELEASE</spring.cloud.alibaba.version> <common.jexl.version>2.1.1</common.jexl.version> <axis.version>1.4</axis.version> <jaxrpc.version>1.1</jaxrpc.version> <commons.discovery.version>0.2</commons.discovery.version> <wsdl4j.version>1.5.1</wsdl4j.version> <saaj.api.version>1.3</saaj.api.version> <common.rabbitmq.version>1.0.0-RELEASE</common.rabbitmq.version> <jsch.version>0.1.54</jsch.version> <aviator.version>5.3.3</aviator.version> <okhttp3.version>3.10.0</okhttp3.version> <caffeine.version>2.9.3</caffeine.version> </properties> <dependencies> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.3</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bootstrap</artifactId> <version>3.0.4</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</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-loadbalancer</artifactId> </dependency> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> <exclusions> <exclusion> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-ribbon</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> <!--WebSocket--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-ldap</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>base</artifactId> <version>${common.base.version}</version> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>database</artifactId> <version>${common.database.version}</version> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>jwt-login</artifactId> <version>${common.jwt-login.version}</version> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>rabbitmq</artifactId> <version>${common.rabbitmq.version}</version> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>xxl-job</artifactId> <version>${common.xxl-job.version}</version> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>log-operation</artifactId> <version>${common.log-operation.version}</version> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>log-request</artifactId> <version>${common.log-request.version}</version> </dependency> <dependency> <groupId>com.ramaxel</groupId> <artifactId>redis</artifactId> <version>${common.redis.version}</version> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>${java.mail.version}</version> </dependency> <!--执行string代码--> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-jexl</artifactId> <version>${common.jexl.version}</version> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency> <dependency> <groupId>org.apache.axis</groupId> <artifactId>axis</artifactId> <version>${axis.version}</version> </dependency> <dependency> <groupId>commons-discovery</groupId> <artifactId>commons-discovery</artifactId> <version>${commons.discovery.version}</version> </dependency> <dependency> <groupId>wsdl4j</groupId> <artifactId>wsdl4j</artifactId> <version>${wsdl4j.version}</version> </dependency> <dependency> <groupId>javax.xml</groupId> <artifactId>jaxrpc</artifactId> <version>${jaxrpc.version}</version> </dependency> <dependency> <groupId>javax.xml.soap</groupId> <artifactId>saaj-api</artifactId> <version>${saaj.api.version}</version> </dependency> <!-- SFTF 文件传输--> <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> <version>${jsch.version}</version> </dependency> <dependency> <groupId>com.googlecode.aviator</groupId> <artifactId>aviator</artifactId> <version>${aviator.version}</version> </dependency> <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>${okhttp3.version}</version> </dependency> <!-- 引入MicrometerPrometheus集成的依赖库。Micrometer是一个度量收集库,用于在Java应用程序中收集度量标准。 Prometheus是一个开源监控系统,它通过HTTP拉取(pull)的方式收集时间序列数据。 这个依赖允许Spring Boot应用Prometheus监控系统集成,以便暴露其度量数据给Prometheus。 - groupId: io.micrometer 表示该依赖库所属的组。 - artifactId: micrometer-registry-prometheus 表示具体的依赖库名称。 --> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency> <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> <version>${caffeine.version}</version> <!-- 推荐使用稳定版本 --> </dependency> </dependencies> <!--全局引入springcloudalibaba下载依赖地址,并不会引入依赖--> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring.cloud.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-alibaba-dependencies</artifactId> <version>${spring.cloud.alibaba.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <!-- <build>--> <!-- <plugins>--> <!-- <plugin>--> <!-- <groupId>org.springframework.boot</groupId>--> <!-- <artifactId>spring-boot-maven-plugin</artifactId>--> <!-- <configuration>--> <!-- <layout>ZIP</layout>--> <!-- </configuration>--> <!-- </plugin>--> <!-- </plugins>--> <!-- </build>--> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>dev</id> <properties> <spring.profiles>dev</spring.profiles> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>localhost</id> <properties> <spring.profiles>localhost</spring.profiles> </properties> </profile> <profile> <id>test</id> <properties> <spring.profiles>test</spring.profiles> </properties> </profile> <profile> <id>prod</id> <properties> <spring.profiles>prod</spring.profiles> </properties> </profile> </profiles> <distributionManagement> <repository> <id>releases</id> <name>releases Repository</name> <url>http://10.2.200.94:8081/repository/maven-releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <name>snapshots Repository</name> <url>http://10.2.200.94:8081/repository/maven-snapshots/</url> </snapshotRepository> </distributionManagement> </project>
11-11
<?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"> <modelVersion>4.0.0</modelVersion> <name>Timo后台管理系统</name> <description>快速搭建后台管理的系统</description> <groupId>com.linln</groupId> <artifactId>timo</artifactId> <version>2.0.3</version> <packaging>pom</packaging> <modules> <module>admin</module> <module>common</module> <module>component</module> <module>devtools</module> <module>modules</module> </modules> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.7</version> <relativePath/> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <!--shiro权限管理框架版本:component.shiro--> <shiro.version>1.9.0</shiro.version> <lombok.version>1.18.24</lombok.version> <ehcache.version>2.10.9.2</ehcache.version> <mysql.connector.version>5.1.46</mysql.connector.version> <jsoup.version>1.14.3</jsoup.version> <!--shiro模板视图权限标签扩展:component.thymeleaf--> <thymeleaf-shiro.version>2.1.0</thymeleaf-shiro.version> <!--excel工具框架版本:component.excel--> <poi.version>4.1.2</poi.version> <!--jwt处理框架版本:component.jwt--> <jwt.version>3.19.1</jwt.version> <!--swagger-knife4j接口文档页面:component.jwt--> <knife4j.version>3.0.3</knife4j.version> <google.findbugs.version>3.0.1</google.findbugs.version> <skipTests>true</skipTests> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <!--spring data jpa持久层框架--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <!--mysql连接驱动--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.connector.version}</version> <scope>runtime</scope> </dependency> <!--lombok语法糖--> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> <optional>true</optional> </dependency> <!--ehcache缓存框架--> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>${ehcache.version}</version> </dependency> <!--html解析工具,处理xss攻击--> <dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>${jsoup.version}</version> </dependency> <!--knife4j 接口文档--> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-spring-boot-starter</artifactId> <version>${knife4j.version}</version> </dependency> <!--解决编译时javax.annotation.meta.When不存在问题--> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>annotations</artifactId> <version>${google.findbugs.version}</version> </dependency> </dependencies> <!--多环境配置--> <profiles> <!--开发环境--> <profile> <id>dev</id> <activation> <!--默认配置--> <activeByDefault>true</activeByDefault> </activation> <properties> <profile.name>dev</profile.name> </properties> </profile> <!--生产环境--> <profile> <id>prod</id> <properties> <profile.name>prod</profile.name> </properties> </profile> </profiles> </project>
06-28
<?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.bingosite</groupId> <artifactId>bs-system</artifactId> <version>2.2.2</version> <description> bs-system系统模块 </description> <properties> <revision>2.2.2</revision> <module.revision>2.2.2-SNAPSHOT</module.revision> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>17</java.version> <spring-cloud.version>2023.0.3</spring-cloud.version> <spring-cloud-alibaba.version>2023.0.1.2</spring-cloud-alibaba.version> <spring-boot.version>3.2.11</spring-boot.version> <lombok.version>1.18.34</lombok.version> <mapstruct-plus.version>1.4.5</mapstruct-plus.version> <mapstruct-plus.lombok.version>0.2.0</mapstruct-plus.lombok.version> <!-- 插件版本 --> <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version> <maven-war-plugin.version>3.2.2</maven-war-plugin.version> <maven-compiler-plugin.verison>3.11.0</maven-compiler-plugin.verison> <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version> <flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version> <hutool.version>5.8.31</hutool.version> <redisson.version>3.37.0</redisson.version> <lock4j.version>2.2.7</lock4j.version> <dubbo.version>3.2.14</dubbo.version> <dubbo-registry-eureka.version>2.7.23</dubbo-registry-eureka.version> <!-- 单独指定eureka注册中心版本 --> <!-- 添加Eureka客户端依赖版本 --> <eureka-client.version>1.10.17</eureka-client.version> <swagger.core.version>2.2.22</swagger.core.version> <easyexcel.version>4.0.3</easyexcel.version> <!-- 离线IP地址定位库 --> <ip2region.version>2.7.0</ip2region.version> <springdoc.version>2.6.0</springdoc.version> <mybatis-plus.version>3.5.8</mybatis-plus.version> <mybatis.version>3.5.16</mybatis.version> <p6spy.version>3.9.1</p6spy.version> <satoken.version>1.39.0</satoken.version> <therapi-javadoc.version>0.15.0</therapi-javadoc.version> <dynamic-ds.version>4.3.1</dynamic-ds.version> <bouncycastle.version>1.76</bouncycastle.version> <!-- OSS 配置 --> <aws.sdk.version>2.28.22</aws.sdk.version> <aws.crt.version>0.31.3</aws.crt.version> <justauth.version>1.16.6</justauth.version> <!-- SMS 配置 --> <sms4j.version>3.3.3</sms4j.version> <fastjson.version>1.2.83</fastjson.version> <project.lib.path>${pom.basedir}/src/main/resources/lib</project.lib.path> </properties> <dependencyManagement> <dependencies> <!-- SpringCloud 微服务 --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- SpringCloud Alibaba 微服务 --> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-alibaba-dependencies</artifactId> <version>${spring-cloud-alibaba.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- SpringBoot 依赖配置 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- hutool 的依赖配置--> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-bom</artifactId> <version>${hutool.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.swagger.core.v3</groupId> <artifactId>swagger-annotations</artifactId> <version>${swagger.core.version}</version> </dependency> <dependency> <groupId>io.github.linpeilie</groupId> <artifactId>mapstruct-plus-spring-boot-starter</artifactId> <version>${mapstruct-plus.version}</version> </dependency> <!-- 离线IP地址定位库 ip2region --> <dependency> <groupId>org.lionsoul</groupId> <artifactId>ip2region</artifactId> <version>${ip2region.version}</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> <version>${easyexcel.version}</version> </dependency> <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-api</artifactId> <version>${springdoc.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-spring-boot3-starter</artifactId> <version>${mybatis-plus.version}</version> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-annotation</artifactId> <version>${mybatis-plus.version}</version> </dependency> <!-- sql性能分析插件 --> <dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>${p6spy.version}</version> </dependency> <!-- AWS SDK for Java 2.x --> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3</artifactId> <version>${aws.sdk.version}</version> </dependency> <!-- 使用AWS基于 CRT 的 S3 客户端 --> <dependency> <groupId>software.amazon.awssdk.crt</groupId> <artifactId>aws-crt</artifactId> <version>${aws.crt.version}</version> </dependency> <!-- 基于 AWS CRT 的 S3 客户端的性能增强的 S3 传输管理器 --> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3-transfer-manager</artifactId> <version>${aws.sdk.version}</version> </dependency> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-core</artifactId> <version>${satoken.version}</version> </dependency> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-spring-boot3-starter</artifactId> <version>${satoken.version}</version> </dependency> <!--redisson--> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-boot-starter</artifactId> <version>${redisson.version}</version> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>lock4j-redisson-spring-boot-starter</artifactId> <version>${lock4j.version}</version> </dependency> <dependency> <groupId>com.github.therapi</groupId> <artifactId>therapi-runtime-javadoc</artifactId> <version>${therapi-javadoc.version}</version> </dependency> <!-- 加密包引入 --> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15to18</artifactId> <version>${bouncycastle.version}</version> </dependency> <!-- JustAuth 的依赖配置--> <dependency> <groupId>me.zhyd.oauth</groupId> <artifactId>JustAuth</artifactId> <version>${justauth.version}</version> </dependency> <!--短信sms4j--> <dependency> <groupId>org.dromara.sms4j</groupId> <artifactId>sms4j-spring-boot-starter</artifactId> <version>${sms4j.version}</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>${fastjson.version}</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>5.1.0</version> </dependency> <!-- 使用BOM统一管理Dubbo版本 --> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-bom</artifactId> <version>${dubbo.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> <version>4.1.3</version> </dependency> <!-- 单独配置eureka注册中心依赖 - 增强排除规则 --> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-registry-eureka</artifactId> <version>${dubbo-registry-eureka.version}</version> <exclusions> <!-- 排除所有Spring相关的依赖 --> <exclusion> <groupId>org.springframework</groupId> <artifactId>*</artifactId> </exclusion> <exclusion> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-registry-api</artifactId> </exclusion> <exclusion> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-common</artifactId> </exclusion> <exclusion> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-config-api</artifactId> </exclusion> </exclusions> </dependency> <!-- Eureka客户端依赖 --> <dependency> <groupId>com.netflix.eureka</groupId> <artifactId>eureka-client</artifactId> <version>${eureka-client.version}</version> <exclusions> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> </exclusion> </exclusions> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- 添加Spring beans依赖 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> </dependency> <dependency> <groupId>com.ctrip.framework.apollo</groupId> <artifactId>apollo-client</artifactId> <version>2.4.0</version> </dependency> <dependency> <groupId>com.ctrip.framework.apollo</groupId> <artifactId>apollo-core</artifactId> <version>2.4.0</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.14</version> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-dubbo</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-dubbo-${revision}.jar</systemPath> </dependency> <!-- BingoSite Common Log --> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-log</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-log-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-satoken</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-satoken-${revision}.jar</systemPath> </dependency> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-core</artifactId> </dependency> <!-- Sa-Token 整合 jwt --> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-jwt</artifactId> <version>${satoken.version}</version> </dependency> <!-- BingoSite Common Redis--> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-redis</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-redis-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-core</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-core-${revision}.jar</systemPath> </dependency> <!-- Spring框架基本的核心工具 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> </dependency> <!-- SpringWeb模块 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> </dependency> <!-- Hibernate Validator --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> <!--常用工具类 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <!-- servlet包 --> <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> </dependency> <dependency> <groupId>io.swagger.core.v3</groupId> <artifactId>swagger-annotations</artifactId> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-core</artifactId> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-http</artifactId> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-extra</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency> <!-- 自动生成YML配置关联JSON文件 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-properties-migrator</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>io.github.linpeilie</groupId> <artifactId>mapstruct-plus-spring-boot-starter</artifactId> </dependency> <!-- 离线IP地址定位库 --> <dependency> <groupId>org.lionsoul</groupId> <artifactId>ip2region</artifactId> </dependency> <!--redisson--> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>lock4j-redisson-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-jsr310</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-json</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-json-${revision}.jar</systemPath> </dependency> <!-- JSON工具类 --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-excel</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-excel-${revision}.jar</systemPath> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-dict</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-dict-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-doc</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-doc-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-api</artifactId> </dependency> <dependency> <groupId>com.github.therapi</groupId> <artifactId>therapi-runtime-javadoc</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-kotlin</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-web</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-web-${revision}.jar</systemPath> </dependency> <!-- SpringBoot Web容器 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <artifactId>spring-boot-starter-tomcat</artifactId> <groupId>org.springframework.boot</groupId> </exclusion> </exclusions> </dependency> <!-- web 容器使用 undertow 性能更强 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-undertow</artifactId> </dependency> <!-- SpringBoot Actuator --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-metrics</artifactId> <version>2.7.6</version> <exclusions> <exclusion> <groupId>net.dreamlu</groupId> <artifactId>mica-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.dreamlu</groupId> <artifactId>mica-core</artifactId> <version>2.7.6</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-mybatis</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-mybatis-${revision}.jar</systemPath> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-spring-boot3-starter</artifactId> </dependency> <!-- sql性能分析插件 --> <dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> </dependency> <!-- Dynamic DataSource --> <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot3-starter</artifactId> <version>${dynamic-ds.version}</version> </dependency> <!-- Mysql Connector --> <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-context</artifactId> </dependency> <!-- Dubbo核心依赖 --> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </exclusion> </exclusions> </dependency> <!-- 添加Dubbo Spring适配器 --> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-config-spring</artifactId> <version>${dubbo.version}</version> <exclusions> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-spring-boot-actuator</artifactId> </dependency> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-metadata-report-redis</artifactId> <exclusions> <exclusion> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-registry-eureka</artifactId> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>5.1.0</version> </dependency> <!-- Sa-Token 整合 Dubbo --> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-dubbo3</artifactId> <version>${satoken.version}</version> <exclusions> <exclusion> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-commons</artifactId> </dependency> <!-- <dependency>--> <!-- <groupId>org.bingosite</groupId>--> <!-- <artifactId>bs-common-seata</artifactId>--> <!-- <version>${revision}</version>--> <!-- </dependency>--> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-idempotent</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-idempotent-${revision}.jar</systemPath> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-crypto</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-tenant</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-tenant-${revision}.jar</systemPath> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-extension</artifactId> <version>${mybatis-plus.version}</version> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-security</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-security-${revision}.jar</systemPath> </dependency> <dependency> <groupId>cn.dev33</groupId> <artifactId>sa-token-spring-boot3-starter</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-translation</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-translation-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-sensitive</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-sensitive-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-encrypt</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-encrypt-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15to18</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-oss</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-oss-${revision}.jar</systemPath> </dependency> <!-- AWS SDK for Java 2.x --> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3</artifactId> <exclusions> <!-- 将基于 Netty 的 HTTP 客户端从类路径中移除 --> <exclusion> <groupId>software.amazon.awssdk</groupId> <artifactId>netty-nio-client</artifactId> </exclusion> <!-- 将基于 CRT 的 HTTP 客户端从类路径中移除 --> <exclusion> <groupId>software.amazon.awssdk</groupId> <artifactId>aws-crt-client</artifactId> </exclusion> <!-- 将基于 Apache 的 HTTP 客户端从类路径中移除 --> <exclusion> <groupId>software.amazon.awssdk</groupId> <artifactId>apache-client</artifactId> </exclusion> <!--配置基于 URL 连接的 HTTP 客户端从类路径中移除 --> <exclusion> <groupId>software.amazon.awssdk</groupId> <artifactId>url-connection-client</artifactId> </exclusion> </exclusions> </dependency> <!-- 使用AWS基于 CRT 的 S3 客户端 --> <dependency> <groupId>software.amazon.awssdk.crt</groupId> <artifactId>aws-crt</artifactId> </dependency> <!-- 基于 AWS CRT 的 S3 客户端的性能增强的 S3 传输管理器 --> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3-transfer-manager</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-sse</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-sse-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-mail</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-mail-${revision}.jar</systemPath> </dependency> <dependency> <groupId>jakarta.mail</groupId> <artifactId>jakarta.mail-api</artifactId> </dependency> <dependency> <groupId>org.eclipse.angus</groupId> <artifactId>jakarta.mail</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-social</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-social-${revision}.jar</systemPath> </dependency> <dependency> <groupId>me.zhyd.oauth</groupId> <artifactId>JustAuth</artifactId> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-ratelimiter</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-ratelimiter-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-common-sms</artifactId> <version>${revision}</version> <scope>system</scope> <systemPath>${project.lib.path}/bs-common-sms-${revision}.jar</systemPath> </dependency> <dependency> <groupId>org.dromara.sms4j</groupId> <artifactId>sms4j-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-captcha</artifactId> <version>${hutool.version}</version> </dependency> <!-- BingoSite Api System --> <dependency> <groupId>org.bingosite</groupId> <artifactId>bs-api-system</artifactId> <version>${module.revision}</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> </dependency> <dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId> </dependency> </dependencies> <profiles> <profile> <id>dev</id> <properties> <!-- 环境标识,需要配置文件的名称相对应 --> <profiles.active>dev</profiles.active> <logstash.address>127.0.0.1:4560</logstash.address> </properties> <activation> <!-- 默认环境 --> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>prod</id> <properties> <profiles.active>prod</profiles.active> <logstash.address>127.0.0.1:4560</logstash.address> </properties> </profile> </profiles> <build> <!-- <finalName>${project.artifactId}</finalName>--> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.verison}</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> <annotationProcessorPaths> <path> <groupId>com.github.therapi</groupId> <artifactId>therapi-runtime-javadoc-scribe</artifactId> <version>0.15.0</version> </path> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> </path> <path> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <version>${spring-boot.version}</version> </path> <path> <groupId>io.github.linpeilie</groupId> <artifactId>mapstruct-plus-processor</artifactId> <version>${mapstruct-plus.version}</version> </path> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok-mapstruct-binding</artifactId> <version>${mapstruct-plus.lombok.version}</version> </path> </annotationProcessorPaths> <compilerArgs> <arg>-parameters</arg> </compilerArgs> </configuration> </plugin> <!-- 单元测试使用 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven-surefire-plugin.version}</version> <configuration> <argLine>-Dfile.encoding=UTF-8</argLine> <!-- 根据打包环境执行对应的@Tag测试方法 --> <groups>${profiles.active}</groups> <!-- 排除标签 --> <excludedGroups>exclude</excludedGroups> </configuration> </plugin> <!-- 统一版本号管理 --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>flatten-maven-plugin</artifactId> <version>${flatten-maven-plugin.version}</version> <configuration> <updatePomFile>true</updatePomFile> <flattenMode>resolveCiFriendliesOnly</flattenMode> </configuration> <executions> <execution> <id>flatten</id> <phase>process-resources</phase> <goals> <goal>flatten</goal> </goals> </execution> <execution> <id>flatten.clean</id> <phase>clean</phase> <goals> <goal>clean</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring-boot.version}</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins> <resources> <resource> <directory>src/main/resources</directory> <!-- 关闭过滤 --> <filtering>false</filtering> </resource> <resource> <directory>src/main/webapp/</directory> </resource> <resource> <directory>src/main/resources</directory> <!-- 引入所有 匹配文件进行过滤 --> <includes> <include>application*</include> <include>bootstrap*</include> <include>logback*</include> </includes> <!-- 启用过滤 即该资源中的变量将会被过滤器中的值替换 --> <filtering>true</filtering> </resource> </resources> </build> <repositories> <repository> <id>public</id> <name>huawei nexus</name> <url>https://mirrors.huaweicloud.com/repository/maven/</url> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>csvw</id> <url>http://nexus.csvw.com/repository/maven-public/</url> </repository> </repositories> <!-- <pluginRepositories>--> <!-- <pluginRepository>--> <!-- <id>public</id>--> <!-- <name>huawei nexus</name>--> <!-- <url>https://mirrors.huaweicloud.com/repository/maven/</url>--> <!-- <releases>--> <!-- <enabled>true</enabled>--> <!-- </releases>--> <!-- <snapshots>--> <!-- <enabled>false</enabled>--> <!-- </snapshots>--> <!-- </pluginRepository>--> <!-- </pluginRepositories>--> </project> 报 历史记录 avater No such extension org.apache.dubbo.registry.RegistryFactory by name eureka, possible causes:
08-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值