idea建springcloud项目_idea创建springcloud项目图文教程(EurekaServer注册中心)

http://blog.csdn.net/hcmony/article/details/77854999

idea创建springcloud项目图文教程(EurekaServer注册中心)(六)

1,new -project 选择spring initializr

ca33a85c1f0d90026677101cbeabad50.png

2,创建自己的包名,类名。

044e4d2d9c315d430a1df03df3b99d8a.png

3,这一步与创建springboot有区别,画重点了,注意下面的两个红框框

f7007066324e18d5199d692641eb57f7.png

4,项目名

72a3f6b6dddfc12f70faebadda92e84f.png

5,SpringcloudDemoApplication.java  启动类。

package com.hcmony;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

@EnableEurekaServer

@SpringBootApplication

public class SpringcloudDemoApplication {

public static void main(String[] args) {

SpringApplication.run(SpringcloudDemoApplication.class, args);

}

}

6,application.properties的配置文件 。

server.port=8761

eureka.instance.hostname=192.168.18.163

eureka.client.register-with-eureka=false

eureka.client.fetch-registry=false

eureka.client.service-url.defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/

7,可以启动了。

springcloud 源代码 https://github.com/hcmony/springcloud.git

idea创建maven项目,本教程适合各类小白(一)

idea创建maven,spring,springmvc,mybatis,项目(二)

idea创建maven,spring,springmvc,mybatis,项目(三)

idea创建springboot项目图文教程(四)

idea创建springboot项目图文教程(配置文件)(五)

idea创建springcloud项目图文教程(EurekaServer注册中心)(六)

idea创建springcloud项目图文教程(创建服务提供者)(七)

idea创建springcloud项目图文教程(创建消费者)(八)

idea创建springcloud项目图文教程(Feign实现负载均衡)(九)

idea创建springcloud项目图文教程(config 实现配置中心)(十一)

idea创建springcloud项目图文教程(bus 消息总线)(十二)

---------------------

作者:hcmony

来源:CSDN

原文:https://blog.csdn.net/hcmony/article/details/77855158

版权声明:本文为博主原创文章,转载请附上博文链接!

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值