Skip to content

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

@taotao365s

Description

@taotao365s

现象

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();
        }

    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions