美文网首页
常见问题

常见问题

作者: 追风的云月 | 来源:发表于2022-11-15 16:18 被阅读0次
  1. 无法push,因为没有commit
  2. springboot:出现Could not transfer artifact org.springframework.boot:spring-boot-等问题解决方法:大概率和Maven有关,使用Maven刷新
  3. 日志格式:logback?log4j?log4j2?:现在使用log4j2,和log4j使用方式有些不一致;
  4. 启动项目出现
main Error Error processing element appender

是log4j2的xml配置有问题

  1. Springboot Application启动异常
The class hierarchy was loaded from the following locations
NoSuchMethodError 找不到方法

springboot 版本和springboot cloud 版本不一致
但是不一定是cloud版本,有可能是里面的eruaka

  1. APPLICATION FAILED TO START due to same bean
    相同的类
  2. 如果class not found 那就添加pom
  3. 替换某个parent,可以直接在pom里面替换;
  4. 启动时报某个类空指针
    https://www.jianshu.com/p/e0d6e2cf726c
    https://blog.csdn.net/zeal9s/article/details/83855431
    https://jingyan.baidu.com/article/48b37f8dd241491a646488bc.html
  1. 启动类文件要在项目包名一级目录下
  2. 项目配置多数据源
    https://juejin.cn/post/6844903957186232327
  3. gitignore中忽略了.idea文件夹,但是提交时仍旧会出现.idea内文件变动的情况

原因:.idea已经被git跟踪,之后再加入.gitignore后是没有作用的

解决办法:.gitignore中添加.idea,清除.idea的git缓存,git rm -r --cached .idea

  1. 重命名项目
    找不到启动类,可能启动类在idea的路径还是前项目命名

  2. 找到不到service类
    可能是因为没有在impl类 加@service注解 那就扫不到

  3. 用Ieda可以快速生成接口的实现类

  4. 一个老框架的登录模块移入新框架
    需要考虑鉴权问题
    比如token生成方式,和各种实体类以及VO的不一致

  5. springboot项目重命名
    https://blog.csdn.net/m0_67391377/article/details/126516109

  6. The injection point has the following annotations:- @org.springframework.beans.factory.annotation
    mapper.xml namespace没有正确的命名
    或者mapperscan没有扫到

  7. spring boot security
    可以添加过滤的路由,不然会出现401

  1. Unknown column 字段名 in ‘where clause’
    是sql的条件拼接有问题,column里面没有这个字段;问题出在xml或者querywrapper
  1. 【Mybatis】Parameter 'XXX' not found. Available parameters are [1, 0, param1, param2]
    给xml的参数不一致

target 是什么
如果我要传输xml文件 从哪里获取
我生成的xml存在哪里
xml传输有没有坑

  1. "The Bean Validation API is on the classpath but no implementation could be found" preventing startup(https://stackoverflow.com/questions/48483120/the-bean-validation-api-is-on-the-classpath-but-no-implementation-could-be-foun)
    缺validation包

  2. @Mapkey的使用

    (查询明明是会返回一个list 但是偏要用map去接收)

在多值查询的时候,通常要把方法返回类型设置为List<Dto>类型,Mybatis为我们提供了另一种解决方式,通过K-V的形式将查询结果保存在Map中,这种实现方式只需要在方法上标注为@Mapkey即可。

  1. 多集群的定时任务
    分布式锁考虑Redis或者数据库锁(https://blog.csdn.net/weixin_42641909/article/details/106721358

  2. 线程属于进程

  3. unable to write command into connection slot 0 addr null
    启动项目后,访问数据遇到的问题,属于Redis类型的问题,当时是Everest网络断了

相关文章

网友评论

      本文标题:常见问题

      本文链接:https://www.haomeiwen.com/subject/rxpnzrtx.html