创建父级项目 只需保留pom.xml文件
这里只需搭建一个微服务 其他操作并无
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://:9001/eureka/ instance: instance-id: 8001 prefer-ip-address: true #访问路径显示ip地址mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl3.启动类
@SpringBootApplication@EnableEurekaClientpublic class DeptMain8001 { public static void main(String[] args) { SpringApplication.run(DeptMain8001.class,args); }}测试
是不是很简单呢 启动时 要先启动注册中心 再启动客户端
这样就算搭建好啦~!
到此这篇关于5分钟搭建SpringCloud Eureka服务注册中心的实现的文章就介绍到这了,更多相关SpringCloud Eureka服务注册中心内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!