问题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
- 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})