From 4a199bf4e4633912990f670052b6cb976cc914ac Mon Sep 17 00:00:00 2001 From: zcoder Date: Fri, 30 Oct 2020 20:55:41 +0800 Subject: [PATCH] update doc/docs/build.md. --- doc/docs/build.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/doc/docs/build.md b/doc/docs/build.md index f3f8705f..7d0eb11d 100644 --- a/doc/docs/build.md +++ b/doc/docs/build.md @@ -309,4 +309,68 @@ fatjar 打包第一步,在 pom.xml 添加如下配置 第二步:通过 Maven 打包 执行命令 `mvn clean package` 进行打包,在 pom.xml 对应的模块下会生成一个 xxx-with-dependencies.jar 的 jar 包,复制该 jar -到服务器上,执行 `java -jar xxx-with-dependencies.jar` 即可启动项目。 \ No newline at end of file +到服务器上,执行 `java -jar xxx-with-dependencies.jar` 即可启动项目。 + +注意:如果您使用了motan,那么在打包fatjar时需要将spi扩展声明文件需要使用追加模式,可参考 +``` + + org.apache.maven.plugins + maven-shade-plugin + 2.3 + + + package + + shade + + + + + + META-INF/spring.schemas + + + META-INF/spring.handlers + + + META-INF/services/com.weibo.api.motan.registry.Registry + + + META-INF/services/com.weibo.api.motan.registry.RegistryFactory + + + META-INF/services/com.weibo.api.motan.rpc.Protocol + + + META-INF/services/com.weibo.api.motan.cluster.LoadBalance + + + META-INF/services/com.weibo.api.motan.cluster.Cluster + + + META-INF/services/com.weibo.api.motan.codec.Codec + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + +``` -- Gitee