zoukankan      html  css  js  c++  java
  • java 问题汇总

    1.自动加载出错
      require a bean of ....
      The injection point has the following annotations:
      - @org.springframework.beans.factory.annotation.Autowired(required=true)
      排查步骤:
        1.1 检查springboot 项目的配置文件;
        1.2 @SpringBootApplication 和@Configuration 注解重合,且@Configuration优先级更高,但配置不正确
          1.3 数据库连接有问题,使用了连接池,但是没有配置连接池的config
    
    2.The POM for postgresql:postgresql:jar:42.2.5 is missing, no dependency information available
      原因:项目中mvn 使用的postgresql的目录不在org.postgresql下面
    
    3.Error:(1, 38) java: 需要<标识符>
     Error:(3, 44) java: 需要class, interface或enum
     原因:文件名与关键字重复
    
    4.No operator matches the given name and argument type(s). You might need to add explicit type casts
      原因:sql语句符号的问题,单反引号
    
    5.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
      原因
    
    6.nullpointError 空指针异常
       原因:在service 中定义了 了类型为mapper的属性
    
    7. ERROR: column "end_use_time" is of type timestamp without time zone
      原因:mapper中数据类型错误
    
    8.can`t create a bean ....
      原因: mapper 类和mapper.xml文件定义数据类型不一样,其他可能,**mapper.xml文件中id重复、返回数据类型错误、.xml文件没有加载成功;
    
    9.Invalid bound statement (not found): com.medatc.disinfection.mapper.fdn.FilesMapper.selectFilesByIds
      原因:
    
    10.WebServerException: Could not load key store 'null'
      原因:spring-boot中的application.properties里配置https证书路径错误
    
    11.Maven打包:去掉项目版本号
      <build><finalName>medatc-cloud-core</finalName></build>
    
    12. verify: Detected task failure
      原因:docker镜像打包不成功,是由于pom文件中缺少配置:
      <!--spring-boot-maven-plugin -->
      <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <configuration>
              <fork>true</fork>
          </configuration>
          <executions>
              <execution>
                  <goals>
                      <goal>repackage</goal>
                  </goals>
              </execution>
          </executions>
      </plugin>

    13. 日志打印的问题:
      现象:出现空指针,找不到打印的行及详情,
      解决:e.getLocalizedMessage()
      参考

    14.使用CsvReader读取csv文件遇到Bom头的问题:
      参考

  • 相关阅读:
    Axios 各种请求方式传递参数格式
    axios POST提交数据的三种请求方式写法
    Json对象和Json字符串的区别
    ASP.NET Core 使用 AutoFac 注入 DbContext
    asp.net core signalr Error: Failed to start the transport 'WebSockets': null
    js中settimeout和setinterval的区别是什么?
    VS IDE开发字体推荐
    .net core ef core 自动迁移,自动修改数据库
    localstorage和sessionstorage的区别
    TinyOS编程
  • 原文地址:https://www.cnblogs.com/qq1069284034/p/11460616.html
Copyright © 2011-2022 走看看