spring-cloud常见问题集锦

  • eureka-server Whitelabel Error Page

创建eureka-server,在浏览器打开 http://localhost:8761/

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Dec 11 22:51:51 CST 2018
There was an unexpected error (type=Not Found, status=404).
No message available

 启动类没有添加@EnableEurekaServer

@EnableEurekaServer
@SpringBootApplication
public class EurekaServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(EurekaServerApplication.class, args);
    }
}
  • IntelliJ Idea 不能启动多个线程

'xxxx' is not allowed to run in parallel,Would you like to stop the running one?

依次点击【Run】-->【Run...】-->【Edit Configurations...】,选中右上角【Allow running in parallel】前面的复选框

  • IntelliJ Idea 快捷键

跳出双引号:shift+"
跳出单引号:shift+'
跳出括号:shift+)
跳出中括号:shift+]
以此类推 
  • IntelliJ Idea 添加springboot依赖

创建maven项目时,可以选择springboot的启动器类,创建完以后再想添加其他依赖,比如想添加断路器netflix-hystrix,可以按

快捷键Alt+Insert,在弹出的窗口中选择Dependency,然后在弹出的Maven Artifact Search窗口中录入断路器的包名cloud,向下滚动到spring-cloud-starter-netflix-hystrix,选中即可。

  • IntelliJ Idea module not specified

启动springcloud项目时,提示module not specified

在Run Dashboard视频,右键出错的项目,在弹出菜单中选择【Edit Configuration】,展开【Main class】下的【Enviroment】,在【Use classpath of module】下拉框中选择当前项目,【确定】即可。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值