nacos-group / nacos-plugin

A collection of Nacos plug-ins, providing Nacos with pluggable plug-in capabilities, support for user customization and high scalability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问编写完插件后,如何打到nacos-server中

buruoyanyang opened this issue · comments

我这边支持了一下Sqlserver数据源,完成了plugin的编写,是需要将实现复制到nacos/plugin项目中,还是有其他方式?官网说明中是先编译nacos本体,然后install插件就没了。请大佬们赐教~

如果代码启动直接 install 到本地 然后再pom中添加依赖即可
如果startup.sh启动将jar放在${BASE_DIR}/plugins文件夹下面 或者添加在classPath里
image

我在nacos-datasource-plugin module中添加了如下依赖:

com.alibaba.nacos
nacos-postgresql-datasource-plugin-ext
1.0.0-SNAPSHOT

发现不能正常工作,因为在nacos-datasource-plugin模块 ExternalDataSourceProperties里面默认的数据库驱动就是com.mysql.cj.jdbc.Driver

我在nacos-datasource-plugin module中添加了如下依赖: com.alibaba.nacos nacos-postgresql-datasource-plugin-ext 1.0.0-SNAPSHOT 发现不能正常工作,因为在nacos-datasource-plugin模块 ExternalDataSourceProperties里面默认的数据库驱动就是com.mysql.cj.jdbc.Driver
参考下面的文章就可以解决:
https://github.com/nacos-group/nacos-plugin/tree/develop/nacos-datasource-plugin-ext

commented

我这边支持了一下Sqlserver数据源,完成了plugin的编写,是需要将实现复制到nacos/plugin项目中,还是有其他方式?官网说明中是先编译nacos本体,然后install插件就没了。请大佬们赐教~

@buruoyanyang :代码是否可以分享一下呢?感谢。