pom.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>com.sckw</groupId>
  8. <artifactId>sckw-common</artifactId>
  9. <version>1.0.0</version>
  10. </parent>
  11. <artifactId>sckw-common-datasource</artifactId>
  12. <version>1.0.0</version>
  13. <description>多数据源</description>
  14. <properties>
  15. <maven.compiler.source>17</maven.compiler.source>
  16. <maven.compiler.target>17</maven.compiler.target>
  17. <maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
  18. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  19. <mysql.version>8.0.30</mysql.version>
  20. <mybatis-plus.version>3.5.3.1</mybatis-plus.version>
  21. <dynamic-datasource.version>3.6.1</dynamic-datasource.version>
  22. <latest.release.version>5.2.0</latest.release.version>
  23. <shardingsphere-jdbc.version>5.3.0</shardingsphere-jdbc.version>
  24. </properties>
  25. <dependencies>
  26. <!--mysql-->
  27. <dependency>
  28. <groupId>com.mysql</groupId>
  29. <artifactId>mysql-connector-j</artifactId>
  30. </dependency>
  31. <!--mybatis-plus 依赖-->
  32. <dependency>
  33. <groupId>com.baomidou</groupId>
  34. <artifactId>mybatis-plus-boot-starter</artifactId>
  35. <version>${mybatis-plus.version}</version>
  36. </dependency>
  37. <!--多数据源-->
  38. <dependency>
  39. <groupId>com.baomidou</groupId>
  40. <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
  41. <version>${dynamic-datasource.version}</version>
  42. </dependency>
  43. <!--sharding-jdbc-->
  44. <dependency>
  45. <groupId>org.apache.shardingsphere</groupId>
  46. <artifactId>shardingsphere-jdbc-core</artifactId>
  47. <version>${shardingsphere-jdbc.version}</version>
  48. <exclusions>
  49. <!--排查logback日志-->
  50. <exclusion>
  51. <groupId>ch.qos.logback</groupId>
  52. <artifactId>logback-classic</artifactId>
  53. </exclusion>
  54. </exclusions>
  55. </dependency>
  56. <!--shardingsphere集群模式注册到nacos-->
  57. <dependency>
  58. <groupId>org.apache.shardingsphere</groupId>
  59. <artifactId>shardingsphere-cluster-mode-repository-nacos</artifactId>
  60. <version>${shardingsphere-jdbc.version}</version>
  61. </dependency>
  62. <dependency>
  63. <groupId>org.apache.shardingsphere</groupId>
  64. <artifactId>shardingsphere-sharding-api</artifactId>
  65. <version>${shardingsphere-jdbc.version}</version>
  66. </dependency>
  67. </dependencies>
  68. <build>
  69. <plugins>
  70. <plugin>
  71. <groupId>org.apache.maven.plugins</groupId>
  72. <artifactId>maven-shade-plugin</artifactId>
  73. <version>3.2.4</version>
  74. <configuration>
  75. <createDependencyReducedPom>false</createDependencyReducedPom>
  76. <filters>
  77. <filter>
  78. <artifact>*:*</artifact>
  79. <excludes>
  80. <exclude>META-INF/services/**</exclude>
  81. </excludes>
  82. </filter>
  83. </filters>
  84. <transformers>
  85. <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  86. <resource>META-INF/services/*</resource>
  87. </transformer>
  88. </transformers>
  89. </configuration>
  90. <executions>
  91. <execution>
  92. <phase>package</phase>
  93. <goals>
  94. <goal>shade</goal>
  95. </goals>
  96. </execution>
  97. </executions>
  98. </plugin>
  99. </plugins>
  100. </build>
  101. </project>