Java 为什么sql插入不使用postgresl 13自动生成种子

Java 为什么sql插入不使用postgresl 13自动生成种子,java,postgresql,mybatis,Java,Postgresql,Mybatis,今天我遇到了一个有线问题,mybatis中的insert sql没有使用PostgreSQL主键种子。这是我的PostgreSQL 13主键id自动递增种子值: select CURRVAL(pg_get_serial_sequence('rss_sub_source', 'id')) 当前值为1233。但当我在我的应用程序中的mybatis中插入一条新记录时,它会得到一个小于1233的id,这会引起一些麻烦。这是从我的应用程序跟踪到的日志: DEBUG [http-nio-11014-ex

今天我遇到了一个有线问题,mybatis中的insert sql没有使用PostgreSQL主键种子。这是我的PostgreSQL 13主键id自动递增种子值:

select CURRVAL(pg_get_serial_sequence('rss_sub_source', 'id')) 
当前值为1233。但当我在我的应用程序中的mybatis中插入一条新记录时,它会得到一个小于1233的id,这会引起一些麻烦。这是从我的应用程序跟踪到的日志:

DEBUG [http-nio-11014-exec-1] - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3ba3aecd]
DEBUG [http-nio-11014-exec-1] - Creating a new SqlSession
DEBUG [http-nio-11014-exec-1] - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@374a5a38] was not registered for synchronization because synchronization is not active
DEBUG [http-nio-11014-exec-1] - JDBC Connection [HikariProxyConnection@1612904926 wrapping org.postgresql.jdbc.PgConnection@4adde074] will not be managed by Spring
DEBUG [http-nio-11014-exec-1] - ==>  Preparing: INSERT INTO rss_sub_source (sub_url, created_time, updated_time, rss_type, standard_version, next_trigger_time, sub_name, fav_icon_url, local_icon_url) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
DEBUG [http-nio-11014-exec-1] - ==> Parameters: https://redbus2us.com/feed/(String), 1621658832422(Long), 1621658832422(Long), RSS(String), rss_2.0(String), 2021-05-22 12:47:11.677(Timestamp), RedBus2US(String), https://redbus2us.com/wp-content/uploads/2014/11/redbus2us_simple_logo.png(String), 2021/5/22/redbus2us.com-redbus2us_simple_logo.png(String)
DEBUG [http-nio-11014-exec-1] - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@374a5a38]
2021-05-22 12:47:12.479 ERROR 20238 --- [io-11014-exec-1] c.d.s.p.c.i.channel.SubSourceController  : rss parse error

org.springframework.dao.DuplicateKeyException: 
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "rss_sub_source_pkey"
  Detail: Key (id)=(334) already exists.
### The error may exist in class path resource [mybatis/mapper/dolphin/RssSubSourceMapper.xml]
### The error may involve com.dolphin.soa.post.dao.RssSubSourceMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO rss_sub_source (sub_url, created_time, updated_time, rss_type, standard_version, next_trigger_time, sub_name, fav_icon_url, local_icon_url) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
### Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "rss_sub_source_pkey"
  Detail: Key (id)=(334) already exists.
; ERROR: duplicate key value violates unique constraint "rss_sub_source_pkey"
  Detail: Key (id)=(334) already exists.; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "rss_sub_source_pkey"
  Detail: Key (id)=(334) already exists.
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:247) ~[spring-jdbc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:88) ~[mybatis-spring-2.0.5.jar!/:2.0.5]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~[mybatis-spring-2.0.5.jar!/:2.0.5]
    at com.sun.proxy.$Proxy120.insert(Unknown Source) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271) ~[mybatis-spring-2.0.5.jar!/:2.0.5]
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) ~[mybatis-3.5.5.jar!/:3.5.5]
    at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:152) ~[mybatis-3.5.5.jar!/:3.5.5]
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy130.insertSelective(Unknown Source) ~[na:na]
    at com.dolphin.soa.post.service.impl.channel.SubSourceService.insert(SubSourceService.java:215) ~[classes!/:na]
    at com.dolphin.soa.post.controller.impl.channel.SubSourceController.rssParse(SubSourceController.java:180) ~[classes!/:na]
    at com.dolphin.soa.post.controller.impl.channel.SubSourceController.subChannel(SubSourceController.java:126) ~[classes!/:na]
    at com.dolphin.soa.post.controller.impl.channel.SubSourceController.pluginAdd(SubSourceController.java:164) ~[classes!/:na]
    at com.dolphin.soa.post.controller.impl.channel.SubSourceController$$FastClassBySpringCGLIB$$967c088.invoke(<generated>) ~[classes!/:na]
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:119) ~[spring-context-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) ~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at com.dolphin.soa.post.controller.impl.channel.SubSourceController$$EnhancerBySpringCGLIB$$60ae071c.pluginAdd(<generated>) ~[classes!/:na]
    at jdk.internal.reflect.GeneratedMethodAccessor376.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:92) ~[spring-web-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:141) ~[spring-session-core-2.3.3.RELEASE.jar!/:2.3.3.RELEASE]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:82) ~[spring-session-core-2.3.3.RELEASE.jar!/:2.3.3.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93) ~[spring-boot-actuator-2.3.10.RELEASE.jar!/:2.3.10.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.45.jar!/:na]
    at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "rss_sub_source_pkey"
  Detail: Key (id)=(334) already exists.
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) ~[postgresql-42.2.19.jar!/:42.2.19]
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) ~[postgresql-42.2.19.jar!/:42.2.19]
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) ~[postgresql-42.2.19.jar!/:42.2.19]
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481) ~[postgresql-42.2.19.jar!/:42.2.19]
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401) ~[postgresql-42.2.19.jar!/:42.2.19]
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) ~[postgresql-42.2.19.jar!/:42.2.19]
    at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:153) ~[postgresql-42.2.19.jar!/:42.2.19]
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-3.4.5.jar!/:na]
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.5.jar!/:na]
    at jdk.internal.reflect.GeneratedMethodAccessor100.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy181.execute(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.5.jar!/:3.5.5]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.5.jar!/:3.5.5]
    at jdk.internal.reflect.GeneratedMethodAccessor451.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy179.update(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) ~[mybatis-3.5.5.jar!/:3.5.5]
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.5.jar!/:3.5.5]
    at misc.interceptor.db.DefaultTimeInterceptor.invokeUpdate(DefaultTimeInterceptor.java:93) ~[dolphin-common-1.0.0-SNAPSHOT.jar!/:na]
    at misc.interceptor.db.DefaultTimeInterceptor.intercept(DefaultTimeInterceptor.java:55) ~[dolphin-common-1.0.0-SNAPSHOT.jar!/:na]
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy177.update(Unknown Source) ~[na:na]
    at misc.interceptor.db.DefaultTimeInterceptor.invokeUpdate(DefaultTimeInterceptor.java:93) ~[dolphin-common-1.0.0-SNAPSHOT.jar!/:na]
    at misc.interceptor.db.DefaultTimeInterceptor.intercept(DefaultTimeInterceptor.java:55) ~[dolphin-common-1.0.0-SNAPSHOT.jar!/:na]
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy177.update(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor411.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49) ~[mybatis-3.5.5.jar!/:3.5.5]
    at misc.interceptor.db.DynamicDataSourceInterceptor.intercept(DynamicDataSourceInterceptor.java:68) ~[dolphin-common-1.0.0-SNAPSHOT.jar!/:na]
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy177.update(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor411.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy177.update(Unknown Source) ~[na:na]
    at jdk.internal.reflect.GeneratedMethodAccessor411.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~[mybatis-3.5.5.jar!/:3.5.5]
    at com.sun.proxy.$Proxy177.update(Unknown Source) ~[na:na]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ~[mybatis-3.5.5.jar!/:3.5.5]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184) ~[mybatis-3.5.5.jar!/:3.5.5]
    at jdk.internal.reflect.GeneratedMethodAccessor448.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~[mybatis-spring-2.0.5.jar!/:2.0.5]
    ... 73 common frames omitted

2021-05-22 12:47:12.480  WARN 20238 --- [io-11014-exec-1] m.s.advice.ControllerResponseAdvice      : (SERVICE EXCEPTION - SC: 200, RC: 00100100064009) -> 无法解析RSS地址
^C
[root@izbp19pke6x0v6ruecuy1yz dolphin-post]# 
DEBUG[http-nio-11014-exec-1]-关闭非事务性SqlSession[org.apache.ibatis.session.defaults。DefaultSqlSession@3ba3aecd]
调试[http-nio-11014-exec-1]-创建新的SqlSession
调试[http-nio-11014-exec-1]-SqlSession[org.apache.ibatis.session.defaults。DefaultSqlSession@374a5a38]未注册同步,因为同步未处于活动状态
调试[http-nio-11014-exec-1]-JDBC连接[HikariProxyConnection@1612904926包装org.postgresql.jdbc。PgConnection@4adde074]不会由Spring管理
调试[http-nio-11014-exec-1]==>准备:插入rss_子_源(子_url、创建时间、更新时间、rss_类型、标准版本、下一个触发时间、子_名称、fav_图标url、本地_图标url)值(?、、、、、、、、?)
调试[http-nio-11014-exec-1]-==>参数:https://redbus2us.com/feed/(字符串),1621658832422(长),1621658832422(长),RSS(字符串),RSS_2.0(字符串),2021-05-22 12:47:11.677(时间戳),RedBus2US(字符串),https://redbus2us.com/wp-content/uploads/2014/11/redbus2us_simple_logo.png(字符串),2021/5/22/redbus2us.com-redbus2us_simple_logo.png(字符串)
调试[http-nio-11014-exec-1]-关闭非事务性SqlSession[org.apache.ibatis.session.defaults]。DefaultSqlSession@374a5a38]
2021-05-22 12:47:12.479错误20238---[io-11014-exec-1]c.d.s.p.c.i.channel.SubSourceController:rss解析错误
org.springframework.dao.DuplicateKeyException:
###更新数据库时出错。原因:org.postgresql.util.PSQLException:错误:重复键值违反唯一约束“rss\u sub\u source\u pkey”
详细信息:键(id)=(334)已存在。
###该错误可能存在于类路径资源[mybatis/mapper/dolphin/RssSubSourceMapper.xml]中
###错误可能涉及com.dolphin.soa.post.dao.rsssubsourceapper.insertSelective-Inline
###设置参数时出错
###SQL:插入rss_子_源(子_url、创建时间、更新时间、rss_类型、标准版本、下一个触发时间、子_名称、fav_图标_url、本地_图标_url)值(?,,,,,,,,,,,,?)
###原因:org.postgresql.util.PSQLException:错误:重复键值违反唯一约束“rss\u sub\u source\u pkey”
详细信息:键(id)=(334)已存在。
;错误:重复键值违反唯一约束“rss_sub_source_pkey”
详细信息:键(id)=(334)已存在;嵌套异常为org.postgresql.util.PSQLException:错误:重复的键值违反唯一约束“rss\u sub\u source\u pkey”
详细信息:键(id)=(334)已存在。
在org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:247)~[spring-jdbc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)~[spring-jdbc-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.mybatis.spring.MyBatisExceptionTranslator.translateException如果可能(MyBatisExceptionTranslator.java:88)~[mybatis-spring-2.0.5.jar!/:2.0.5]
在org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)~[mybatis-spring-2.0.5.jar!/:2.0.5]
在com.sun.proxy.$Proxy120.insert(未知源)~[na:na]
在org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)~[mybatis-spring-2.0.5.jar!/:2.0.5]
在org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)~[mybatis-3.5.5.jar!/:3.5.5]
在org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:152)~[mybatis-3.5.5.jar!/:3.5.5]
在org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)~[mybatis-3.5.5.jar!/:3.5.5]
在com.sun.proxy.$Proxy130.insertSelective(未知源)~[na:na]
在com.dolphin.soa.post.service.impl.channel.SubSourceService.insert(SubSourceService.java:215)~[classes!/:na]
在com.dolphin.soa.post.controller.impl.channel.SubSourceController.rssParse(SubSourceController.java:180)~[classes!/:na]
在com.dolphin.soa.post.controller.impl.channel.SubSourceController.subChannel(SubSourceController.java:126)~[classes!/:na]
在com.dolphin.soa.post.controller.impl.channel.SubSourceController.pluginad(SubSourceController.java:164)~[classes!/:na]
在com.dolphin.soa.post.controller.impl.channel.SubSourceController$$FastClassBySpringCGLIB$$967c088.invoke()~[classes!/:na]
在org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)~[spring-core-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:163)~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.procedue(CglibAopProxy.java:749)~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:119)~[spring-context-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:186)~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
在org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.procedue(CglibAopProxy.java:749)~[spring-aop-5.2.14.RELEASE.jar!/:5.2.14.RELEASE]
位于org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedIntercep