springboot启动报错Parameter 0 of method a in com.springboot.entity.Student required a bean of type ‘java.lang.String’ that could
springboot服务启动报错,报错信息如下:
*Description:
Parameter 0 of constructor in com.springboot.entity.Student required a bean of type ‘java.lang.String’ that could not be found.
Action:
Consider defining a bean of type ‘java.lang.String’ in your configuration. *
因为项目刚开始搭建,最终定位到是因为bean缺少无参构造。因为spring IOC再通过反射加载实体类时要求bean对象一定要有无参构造