• You aren‘t using a compiler supported by lombok, so lombok will not work and has been disabled.
    Preferences | Build, Execution, Deployment | Compiler
    User-local build process VM options (overrides Shared options):后面添加-Djps.track.ap.dependencies=false

  • @Slf4j找不到log
    Preferences | Build, Execution, Deployment | Compiler | Annotation Processors
    勾选Enable annotation processing
    重启idea

  • pom.xml不可用
    Preferences | Build, Execution, Deployment | Build Tools | Maven | Ignored Files
    取消选中对应项目的pom.xml

  • JDK isn't specified for module '***'
    删除.idea然后刷新一下即可

  • Error:(28, 5) java: No property named "**" exists in source parameter(s). Did you mean "null"?
  • mapstruct忽略了所有的属性,返回空的对象
    错误解释:该错误是使用mapstructlombok结合使用时产生的错误,mapstruct在生成转换代码时找不到属性
    错误分析:原因是因为在生成转换代码时lombok还没有生成setter、getter相应方法,所以找不到属性
    解决办法:在pom.xml中调整顺序lombok放在mapstruct前面编译

  • Web server failed to start. Port 8080 was already in use.
    停掉占用端口的其他Web server,也可以使用下面方法
    Mac系统终端执行

    # 查找8080端口占用pid
    lsof -i tcp:8080
    # `kill`掉
    kill 6095

  • Maven创建的Module不能使用依赖库
    IDEA -> Preferences... -> Build,... -> Maven -> Ignored Files -> 勾掉.../pom.xml


  • main/java文件不能创建Java文件
    右击java -> Mark Directory as -> Sources Root
    Process terminated
    在报错的左侧栏里点击项目名查看错误原因并解决
    解决:中文路径导致


  • Error:(28,57) java: -source 1.5 中不支持 diamond 运算符
    pom.xml中指定当前使用的jdk版本

    <properties>
      <maven.compiler.source>1.8</maven.compiler.source>
      <maven.compiler.target>1.8</maven.compiler.target>
      <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
    </properties>

  • Mac系统idea集成Tomcat出错
    Error running 'Tomcat 9.0.34':Unable to open debugger port (127.0.0.1:xxxxx):java.net.SocketException "Socket closed"
    端口号被占用:调整端口号Startup/Connection -> Debug -> Port
    其他原因:Tomcat安装路径不对导致
    安装Tomcat:https://www.jianshu.com/p/672...

  • Caused by: org.apache.ibatis.type.TypeException: The alias '*' is already mapped to the value '*.*.*'

    错误详细信息:
    Caused by: org.apache.ibatis.type.TypeException:
    The alias 'SiteVo' is already mapped to the value 'com.test.base.vo.manager.SiteVo'

  • 解决办法1:
    一般起名的话,建议最好不要起相同的。
    改下相同类的名称即可。
  • 解决办法2:
    搜索指定包别名(上述配置文件),最好指定确定的范围如com.test.blog.entity,这样就不会出现上面的错误。
03-05 22:12