从零开始搭建springboot+springcloud+mybatis本地项目全过程

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-tomcat

provided

org.springframework.boot

spring-boot-starter-freemarker

org.springframework.boot

spring-boot-starter-cache

org.springframework.boot

spring-boot-starter-actuator

org.springframework.boot

spring-boot-starter-logging

org.springframework.boot

spring-boot-devtools

true

org.springframework.cloud

spring-cloud-starter-config

org.springframework.cloud

spring-cloud-starter-eureka-server

1.3.1.RELEASE

org.springframework.cloud

spring-cloud-starter-contract-stub-runner

test

org.springframework.cloud

spring-cloud-starter-contract-verifier

test

org.springframework.cloud

spring-cloud-stream-test-support

test

org.apache.commons

commons-lang3

3.5

javax.servlet

javax.servlet-api

3.0.1

commons-lang

commons-lang

2.6

五、创建如图所示的目录结构:

①编写注册中心,注册中心目录结构:

在这里插入图片描述

编写WebApplication启动类,添加注解@EnableEurekaServer和@SpringBootApplication,我这里想做一个纯注册中心,不与数据库挂钩,所以增加了一个exclude = DataSourceAutoConfiguration.class,启动项目时不自动与数据库连接,若想让注册中心也连接数据库,这个exclude也可以不要。如图所示:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值