Explorar o código

fix readme

Signed-off-by: AE86 <836391306@qq.com>
AE86 %!s(int64=2) %!d(string=hai) anos
pai
achega
b22d0e756e

+ 2 - 1
README.md

@@ -95,10 +95,11 @@ SELECT OBJECT_ID, OBJECT_NAME, OWNER FROM ALL_OBJECTS WHERE OBJECT_TYPE = 'TABLE
 
 ##### PostgreSQL
 * 通过复制流技术监听增量事件,基于内置插件pgoutput、test_decoding实现解析wal日志
-> 修改postgresql.conf文件,重启服务
+> 1、修改postgresql.conf文件,重启服务
 ``` shell
 wal_level=logical
 ```
+> 2、授予账号权限LOGIN和REPLICATION
 
 ##### File
 * 监听文件修改时间得到变化文件,通过文件偏移量读取最新数据

+ 2 - 2
dbsyncer-common/src/main/java/org/dbsyncer/common/config/IncrementDataConfig.java

@@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration;
  * @date 2022/9/21 22:20
  */
 @Configuration
-@ConfigurationProperties(prefix = "dbsyncer.parser.flush.increment.data")
+@ConfigurationProperties(prefix = "dbsyncer.parser.flush.data.increment")
 public class IncrementDataConfig {
 
     /**
@@ -50,4 +50,4 @@ public class IncrementDataConfig {
     public void setMaxErrorLength(int maxErrorLength) {
         this.maxErrorLength = maxErrorLength;
     }
-}
+}

+ 1 - 2
dbsyncer-listener/src/main/java/org/dbsyncer/listener/AbstractDatabaseExtractor.java

@@ -109,8 +109,7 @@ public abstract class AbstractDatabaseExtractor extends AbstractExtractor {
             }
         }
         Assert.isTrue(!CollectionUtils.isEmpty(indexList), "The primaryKeys is invalid.");
-        Integer[] indexArray = (Integer[]) indexList.toArray();
-        return indexArray;
+        return (Integer[]) indexList.toArray();
     }
 
     private List<Object> queryDqlData(DqlMapper dqlMapper, List<Object> data) {

+ 1 - 1
dbsyncer-parser/src/main/java/org/dbsyncer/parser/strategy/impl/EnableFlushStrategy.java

@@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
  * @date 2021/11/18 22:21
  */
 @Component
-@ConditionalOnProperty(value = "dbsyncer.parser.flush.full.data.enabled", havingValue = "true")
+@ConditionalOnProperty(value = "dbsyncer.parser.flush.data.full.enabled", havingValue = "true")
 public final class EnableFlushStrategy extends AbstractFlushStrategy {
 
 }

+ 4 - 4
dbsyncer-web/src/main/resources/application.properties

@@ -9,10 +9,10 @@ server.servlet.session.timeout=1800
 server.servlet.context-path=/
 
 #parser
-dbsyncer.parser.flush.full.data.enabled=false
-dbsyncer.parser.flush.increment.data.writer-success=true
-dbsyncer.parser.flush.increment.data.writer-fail=true
-dbsyncer.parser.flush.increment.data.max-error-length=2048
+dbsyncer.parser.flush.data.full.enabled=false
+dbsyncer.parser.flush.data.increment.writer-success=true
+dbsyncer.parser.flush.data.increment.writer-fail=true
+dbsyncer.parser.flush.data.increment.max-error-length=2048
 dbsyncer.parser.flush.buffer.actuator.speed.enabled=true
 dbsyncer.parser.flush.buffer.actuator.writer-batch-count=100
 dbsyncer.parser.flush.buffer.actuator.batch-count=1000