木心

毕竟几人真得鹿,不知终日梦为鱼

导航

这个 org.postgresql.jdbc.PgConnection.createClob() 方法尚未被实作

https://www.jianshu.com/p/1953968bf911

 

大意就是Hibernate要验证pgsql的一个方法,但是jdbc没有实现,但是这个错误呢并不影响,所以下面的方法把这块验证给屏蔽掉。

logging.level.org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl= ERROR

 

如果使用logback,则再 logback.xml添加 <logger name="org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl" level="ERROR" />

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="true" scanPeriod="1 seconds">

    <contextName>logback</contextName>

    <property name="log.path" value="./log/logback.log"/>

    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <!-- <filter class="com.example.logback.filter.MyFilter" /> -->
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>INFO</level>
        </filter>
        <encoder>
            <!--<pattern>%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n-->
            <!--<pattern>%d{HH:mm:ss.SSS} [%-16thread] %-5level %-36logger{36} >>> %msg%n-->
            <pattern>%d{HH:mm:ss.SSS} %-5level (%-33file:%line\) : %msg%n
            </pattern>
        </encoder>
    </appender>

    <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.path}</file>
        <prudent>true</prudent>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.path}.%d{yyyy-MM-dd}.txt</fileNamePattern>
        </rollingPolicy>
        <encoder><!--<pattern>%date  %level [%thread] %logger{36} [%fileserver:%line] >>> %msg%n</pattern>-->
            <pattern>%date %level [%thread] %logger{36} >>> %msg%n</pattern>
        </encoder>
    </appender>

    <root level="INFO">
        <appender-ref ref="console"/>
        <appender-ref ref="file"/>
    </root>
    
    <logger name="org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl" level="ERROR" />

</configuration>

 

---

posted on 2020-06-23 10:55  wenbin_ouyang  阅读(1828)  评论(0编辑  收藏  举报