【IDEA】问题处理

问题1: maven 工程为灰色
原因分析:会出现这种情况的原因是不小心忽略了 maven 项目的模块,需要把忽略的 ignore files 取消选中,不再忽略

解决办法:settings → maven → ignoreed files,把 Maven Projects 里灰色项目对应的 ignore files 取消选中就OK了
问题2: cmd too long

原因是系统执行命令时发现命令太长了。
解决方法是在【.idea】 目录下workspace.xml文件里加入以下配置:
在 标签里面

重新启动idea
解决方法2: 如果是springboot 打开 run/dubug configurations 界面 选择
在这里插入图片描述

问题3 : maven setting.xml 多个 mirror 执行顺序
首先按照 * 里面的配置进行匹配,如果匹配到就使用;
如果 * 配对到多个mirror ,则按照文件里面位置的先后顺序使用;

问题4: dubbo 连接 zk 超时 not connected

原因分析 连接超时
解决方法: 增加参数配置

 doubbo.config-center.timeout =  60000

问题5: services 里面没有服务
1.打开idea主页面进入菜单栏,在行向菜单栏里找到View -> Tool windows -> Services也可以使用快捷键ALT+8

2.在刚打开的Services中如果启动类没有启动应该是空,可以如下图配置
在这里插入图片描述

3.在弹出来的菜单里选中springboot

  1. idea2022 只能显示5个 ,在Settings --》 Advanced Settings 中找到了 将此处的数字修改成你需要的即可。

问题6: 屏蔽 javaDoc 里面错误

在这里插入图片描述

问题7: springboot 启动报错 Process finished with exit code 1
在启动类里面增加

try{
  SpringApplication.run(BasicApplication.class, args);
}catch(Exception e)
{
  System.out.println(e.toString());
            e.printStackTrace();
}

问题8: Failed to bind properties under ‘spring.datasource.type’ to java.lang.Class<javax.sql.DataSource>
pom.xml 增加 配置,并坚持对应数据库的jdbc 驱动是否在pom 里面 例如: MySQL的 com.mysql.cj.jdbc.Driver

  <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
        </dependency>
  <!-- MySQL-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

问题9:Failed to determine a suitable driver class

异常信息:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [**com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class**]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class

解决方案:
启动类增加排除

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DruidDataSourceAutoConfigure.class})
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值