mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 17:20:52 +00:00
build: 优化打包配置
This commit is contained in:
parent
c1583f83bb
commit
d9f9fd8bd2
@ -284,11 +284,6 @@
|
|||||||
<include name="*.*"/>
|
<include name="*.*"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${project.build.directory}/build/config" overwrite="true">
|
|
||||||
<fileset dir="${basedir}/../config">
|
|
||||||
<include name="*.*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
|
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
|
||||||
tofile="${project.build.directory}/build/${project.artifactId}.jar"/>
|
tofile="${project.build.directory}/build/${project.artifactId}.jar"/>
|
||||||
|
|
||||||
|
47
novel-admin/src/main/build/config/shardingsphere-jdbc.yml
Normal file
47
novel-admin/src/main/build/config/shardingsphere-jdbc.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
mode:
|
||||||
|
# 单机模式
|
||||||
|
type: Standalone
|
||||||
|
# 元数据持久化
|
||||||
|
repository:
|
||||||
|
# 数据库持久化
|
||||||
|
type: JDBC
|
||||||
|
|
||||||
|
# 数据源配置
|
||||||
|
dataSources:
|
||||||
|
ds_1:
|
||||||
|
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
jdbcUrl: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
|
username: root
|
||||||
|
password: test123456
|
||||||
|
# 规则配置
|
||||||
|
rules:
|
||||||
|
- !SINGLE
|
||||||
|
tables:
|
||||||
|
- "*.*"
|
||||||
|
- !SHARDING
|
||||||
|
tables: # 数据分片规则配置
|
||||||
|
book_content:
|
||||||
|
# 分库策略,缺省表示使用默认分库策略
|
||||||
|
actualDataNodes: ds_${1}.book_content${0..9}
|
||||||
|
# 分表策略
|
||||||
|
tableStrategy:
|
||||||
|
standard:
|
||||||
|
# 分片列名称
|
||||||
|
shardingColumn: index_id
|
||||||
|
# 分片算法名称
|
||||||
|
shardingAlgorithmName: bookContentSharding
|
||||||
|
|
||||||
|
shardingAlgorithms:
|
||||||
|
bookContentSharding:
|
||||||
|
# 行表达式分片算法,使用 Groovy 的表达式,提供对 SQL 语句中的 = 和 IN 的分片操作支持
|
||||||
|
type: INLINE
|
||||||
|
props:
|
||||||
|
# 分片算法的行表达式
|
||||||
|
algorithm-expression: book_content${index_id % 10}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
props:
|
||||||
|
# 是否在日志中打印 SQL
|
||||||
|
sql-show: true
|
@ -63,11 +63,6 @@
|
|||||||
<include name="*.*"/>
|
<include name="*.*"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${project.build.directory}/build/config" overwrite="true">
|
|
||||||
<fileset dir="${basedir}/../config">
|
|
||||||
<include name="*.*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
|
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
|
||||||
tofile="${project.build.directory}/build/${project.artifactId}.jar"/>
|
tofile="${project.build.directory}/build/${project.artifactId}.jar"/>
|
||||||
|
|
||||||
|
47
novel-crawl/src/main/build/config/shardingsphere-jdbc.yml
Normal file
47
novel-crawl/src/main/build/config/shardingsphere-jdbc.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
mode:
|
||||||
|
# 单机模式
|
||||||
|
type: Standalone
|
||||||
|
# 元数据持久化
|
||||||
|
repository:
|
||||||
|
# 数据库持久化
|
||||||
|
type: JDBC
|
||||||
|
|
||||||
|
# 数据源配置
|
||||||
|
dataSources:
|
||||||
|
ds_1:
|
||||||
|
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
jdbcUrl: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
|
username: root
|
||||||
|
password: test123456
|
||||||
|
# 规则配置
|
||||||
|
rules:
|
||||||
|
- !SINGLE
|
||||||
|
tables:
|
||||||
|
- "*.*"
|
||||||
|
- !SHARDING
|
||||||
|
tables: # 数据分片规则配置
|
||||||
|
book_content:
|
||||||
|
# 分库策略,缺省表示使用默认分库策略
|
||||||
|
actualDataNodes: ds_${1}.book_content${0..9}
|
||||||
|
# 分表策略
|
||||||
|
tableStrategy:
|
||||||
|
standard:
|
||||||
|
# 分片列名称
|
||||||
|
shardingColumn: index_id
|
||||||
|
# 分片算法名称
|
||||||
|
shardingAlgorithmName: bookContentSharding
|
||||||
|
|
||||||
|
shardingAlgorithms:
|
||||||
|
bookContentSharding:
|
||||||
|
# 行表达式分片算法,使用 Groovy 的表达式,提供对 SQL 语句中的 = 和 IN 的分片操作支持
|
||||||
|
type: INLINE
|
||||||
|
props:
|
||||||
|
# 分片算法的行表达式
|
||||||
|
algorithm-expression: book_content${index_id % 10}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
props:
|
||||||
|
# 是否在日志中打印 SQL
|
||||||
|
sql-show: true
|
@ -90,11 +90,6 @@
|
|||||||
<include name="application-website.yml"/>
|
<include name="application-website.yml"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${project.build.directory}/build/config" overwrite="true">
|
|
||||||
<fileset dir="${basedir}/../config">
|
|
||||||
<include name="*.*"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${project.build.directory}/build/templates" overwrite="true">
|
<copy todir="${project.build.directory}/build/templates" overwrite="true">
|
||||||
<fileset dir="${basedir}/../templates">
|
<fileset dir="${basedir}/../templates">
|
||||||
<include name="**/*.*"/>
|
<include name="**/*.*"/>
|
||||||
|
47
novel-front/src/main/build/config/shardingsphere-jdbc.yml
Normal file
47
novel-front/src/main/build/config/shardingsphere-jdbc.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
mode:
|
||||||
|
# 单机模式
|
||||||
|
type: Standalone
|
||||||
|
# 元数据持久化
|
||||||
|
repository:
|
||||||
|
# 数据库持久化
|
||||||
|
type: JDBC
|
||||||
|
|
||||||
|
# 数据源配置
|
||||||
|
dataSources:
|
||||||
|
ds_1:
|
||||||
|
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
jdbcUrl: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
|
username: root
|
||||||
|
password: test123456
|
||||||
|
# 规则配置
|
||||||
|
rules:
|
||||||
|
- !SINGLE
|
||||||
|
tables:
|
||||||
|
- "*.*"
|
||||||
|
- !SHARDING
|
||||||
|
tables: # 数据分片规则配置
|
||||||
|
book_content:
|
||||||
|
# 分库策略,缺省表示使用默认分库策略
|
||||||
|
actualDataNodes: ds_${1}.book_content${0..9}
|
||||||
|
# 分表策略
|
||||||
|
tableStrategy:
|
||||||
|
standard:
|
||||||
|
# 分片列名称
|
||||||
|
shardingColumn: index_id
|
||||||
|
# 分片算法名称
|
||||||
|
shardingAlgorithmName: bookContentSharding
|
||||||
|
|
||||||
|
shardingAlgorithms:
|
||||||
|
bookContentSharding:
|
||||||
|
# 行表达式分片算法,使用 Groovy 的表达式,提供对 SQL 语句中的 = 和 IN 的分片操作支持
|
||||||
|
type: INLINE
|
||||||
|
props:
|
||||||
|
# 分片算法的行表达式
|
||||||
|
algorithm-expression: book_content${index_id % 10}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
props:
|
||||||
|
# 是否在日志中打印 SQL
|
||||||
|
sql-show: true
|
Loading…
x
Reference in New Issue
Block a user