1 Star 4 Fork 1

Jinxiaoxiang/nacos-all-postgres

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
修改postgres 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
东哥 提交于 2021-03-19 10:12 . 屏蔽打包校验
<!--
~ Copyright 1999-2018 Alibaba Group Holding Ltd.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
1、只支持postgres 数据库
2、配置文件支持postgres 路径: nacos-1.4.1\console\src\main\resources\application.properties
spring.datasource.platform=postgres
修改点:
com.alibaba.nacos.config.server.utils.PropertyUtil.loadSetting
com.alibaba.nacos.core.listener.StartingApplicationListener.judgeStorageMode
com.alibaba.nacos.config.server.service.datasource.ExternalDataSourceProperties.JDBC_DRIVER_NAME
3、maven pom.xml 增加postgres驱动
\nacos-1.4.1\pom.xml 增加声明依赖
\nacos-1.4.1\config\pom.xml 增加依赖
4、postgres 不支持 limit 1,10
ExternalStoragePaginationHelperImpl.fetchPage
com.alibaba.nacos.config.server.service.repository.extrnal.ExternalStoragePersistServiceImpl.findAllConfigInfoFragment
5、
org.springframework.jdbc.core.PreparedStatementCreator.createPreparedStatement
6、新增postgres 建表语句
7、启动应用
com.alibaba.nacos.Nacos 启动类
vm 增加参数: -Dnacos.standalone=true ; 否则是集群模式启动
8、访问路径
http://127.0.0.1:8848/nacos/
用户名和密码都是nacos
9、 like '%' 'test11122334566' '%'
com.alibaba.nacos.config.server.auth.ExternalUserPersistServiceImpl.findUserLikeUsername
com.alibaba.nacos.config.server.auth.ExternalRolePersistServiceImpl.findRolesLikeRoleName
10、The getKey method should only be used when a single key is returned
com.alibaba.nacos.config.server.service.repository.extrnal.ExternalStoragePersistServiceImpl.addConfigInfoAtomic
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jin-xiaoxiang/nacos-all-postgres.git
git@gitee.com:jin-xiaoxiang/nacos-all-postgres.git
jin-xiaoxiang
nacos-all-postgres
nacos-all-postgres
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385