spring boot 错误记录

错误提示:

 Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'io.renren.modules.sys.dao.excelDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

解决办法:应为dao层缺少注解@Mapper导致的

错误提示:

org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Table 'renren_security.excel_entity' doesn't exist
### The error may exist in io/renren/modules/sys/dao/excelDao.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT  name,sex,birthday  FROM excel_entity
### Cause: java.sql.SQLSyntaxErrorException: Table 'renren_security.excel_entity' doesn't exist
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'renren_security.excel_entity' doesn't exist

解决办法:在没有给entity 注入table_name(),注解时。是不是默认去找实体名_entity.

错误提示:

Cause: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3

原因分析:数组越界导致。

Error querying database.  Cause: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3

原因分析:idex:3 表示的是第三个构造函数参数出现问题。我的是多写了一个参数,
在百度中也会有应为没有提供构造函数出现的同样的问题(@data 注解没不会添加构造函数)。如果项目中使用了mybatisplus和lombok ,
**解决:**在实体类中添加注解:@AllArgsConstructor //全参构造函数
@NoArgsConstructor //无参构造函数

No validator could be found for constraint 'javax.validation.constraints.NotBlank' 
validating type '

**原因分析:**项目中使用的校验注解所支持的数据类型与实体中字段的类型不符合。
例如:
在这里插入图片描述
在Integer类型的字段上使用@NotEmpty,@NotEmpty支持的是字符串类型字段,这样子使用肯定是会报错的。

错误提示:
在这里插入图片描述
**原因分析:**在RequstMapping中存在两个同名的value

错误信息:

Exception encountered during context initialization - cancelling
 refresh attempt: 
 org.springframework.context.ApplicationContextException: Unable to 
 start web server; nested exception is 
 org.springframework.boot.web.server.WebServerException: Unable to
  start embedded Tomcat

**原因分析:**包冲突,可能是poml文件有问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
spring boot中文文档,从安装到部署。 I. Spring Boot文件 1.关于文档 2.获得帮助 3.第一步 4.使用Spring Boot 5.了解Spring Boot功能 6.转向生产 7.高级主题 II。入门 8.介绍Spring Boot 9.系统要求 9.1.Servlet容器 10.安装Spring Boot 10.1.Java Developer的安装说明 10.1.1.Maven安装 10.1.2.Gradle安装 10.2.安装Spring Boot CLI 10.2.1.手动安装 10.2.2.使用SDKMAN安装! 10.2.3.OSX Homebrew安装 10.2.4.MacPorts安装 10.2.5.命令行完成 10.2.6.Windows Scoop安装 10.2.7.快速启动Spring CLI示例 10.3.从早期版本的Spring Boot升级 11.开发您的第一个Spring Boot应用程序 11.1.创建POM 11.2.添加Classpath依赖项 11.3.编写代码 11.3.1.@RestController和@RequestMapping Annotations 11.3.2.@EnableAutoConfiguration注释 11.3.3.“主要”方法 11.4.运行示例 11.5.创建一个可执行的Jar 12.接下来要阅读的内容 III。使用Spring Boot 13.构建系统 13.1.依赖管理 13.2.Maven 13.2.1.继承Starter Parent 13.2.2.在没有父POM的情况下使用Spring Boot 13.2.3.使用Spring Boot Maven插件 13.3.Gradle 13.4.Ant 13.5.Starters 14.构建您的代码 14.1.使用“默认”包 14.2.找到主应用程序类 15.配置类 15.1.导入其他配置类 15.2.导入XML配置 16.自动配置 16.1.逐步更换自动配置 16.2.禁用特定的自动配置类 17. Spring Beans和依赖注入 18.使用@SpringBootApplication Annotation 19.运行您的应用程序 19.1.从IDE运行 19.2.作为打包应用程序运行 19.3.使用Maven插件 19.4.使用Gradle插件 19.5.热插拔 20.开发人员工具 20.1.Property默认值 20.2.自动重启 20.2.1.记录条件评估中的更改 20.2.2.不包括资源 20.2.3.观看其他路径 20.2.4.禁用重启 20.2.5.使用触发器文件 20.2.6.自定义重新启动类加载器 20.2.7.已知限制 20.3.LiveReload 20.4.全局设置 20.5.远程应用 20.5.1.运行远程客户端应用程序 20.5.2.远程更新 21.包装您的生产

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值