Mapper icon indicating copy to clipboard operation
Mapper copied to clipboard

tk.mybatis.mapper.MapperException: 无法获取实体类com.xxx 对应的表名!

Open taotao365s opened this issue 3 years ago • 0 comments

现象

tk.mybatis.mapper.MapperException: 无法获取实体类com.xxx 对应的表名!
	at tk.mybatis.mapper.mapperhelper.EntityHelper.getEntityTable(EntityHelper.java:69)
	at tk.mybatis.mapper.entity.Example.<init>(Example.java:103)
	at tk.mybatis.mapper.entity.Example.<init>(Example.java:88)
	at tk.mybatis.mapper.entity.Example.<init>(Example.java:78)

spring-boot 2.1.4.RELEASE

IDEA中运行

image

服务器运行,springboot

image

解决方案

  • 仓库代码已经修复,需要deploy到厂库中

建议

/**
     * Support Devtools Restart.
     */
    @org.springframework.context.annotation.Configuration
    @ConditionalOnClass(DevToolsProperties.class)    //--------------- 这里再加一段判断,一般我们不用devTool
    @ConditionalOnProperty(prefix = "spring.devtools.restart", name = "enabled", matchIfMissing = true)
    static class RestartConfiguration {

        @Bean
        public MapperCacheDisabler mapperCacheDisabler() {
            return new MapperCacheDisabler();
        }

    }

taotao365s avatar Nov 20 '20 08:11 taotao365s