报错_NoSuchMethodException: cn.mvc.entity.User.<init>()

org.springframework.beans.BeanInstantiationException: Failed to instantiate [cn.mvc.entity.User]: No default constructor found; nested exception is java.lang.NoSuchMethodException: cn.mvc.entity.User.<init>()

添加一个无参的构造器即可!

java 复制代码
    public User() {
    }
相关推荐
huohaiyu2 分钟前
synchronized (Java)
java·开发语言·安全·synchronized
梵得儿SHI2 分钟前
Java 工具类详解:Arrays、Collections、Objects 一篇通关
java·工具类·collections·arrays·objects
熊小猿10 分钟前
Spring Boot 的 7 大核心优势
java·spring boot·后端
摸鱼的老谭12 分钟前
Java学习之旅第二季-13:方法重写
java·学习·方法重写
云灬沙12 分钟前
IDEA2025无法更新使用Terminal控制台
java·intellij-idea·idea·intellij idea
Yield & Allure13 分钟前
IDEA在plugins里搜不到mybatisx插件的解决方法
java·ide·intellij-idea
yunmi_17 分钟前
安全框架 SpringSecurity 入门(超详细,IDEA2024)
java·spring boot·spring·junit·maven·mybatis·spring security
孤独斗士18 分钟前
解决Intellij IDEA控制台,logger.info(),system.out.println()等中文乱码问题
java·ide·intellij-idea
shepherd11122 分钟前
JDK 8钉子户进阶指南:十年坚守,终迎Java 21升级盛宴!
java·后端·面试
SimonKing43 分钟前
SpringBoot集成:5分钟实现HTML转PDF功能
java·后端·程序员