1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

所有服务接入Nacos服务发现

This commit is contained in:
2022-11-05 22:33:44 +08:00
parent feeb171cff
commit 529ef7528e
49 changed files with 174 additions and 127 deletions

View File

@@ -2,10 +2,12 @@ package com.cxyxiaomo.epp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
// 启动类
@SpringBootApplication
@EnableDiscoveryClient
public class UserProvider {
public static void main(String[] args) {
SpringApplication.run(UserProvider.class, args);

View File

@@ -1,7 +1,7 @@
package com.cxyxiaomo.epp.controller;
import com.cxyxiaomo.epp.service.UserServiceImpl;
import com.cxyxiaomo.epp.pojo.User;
import com.cxyxiaomo.epp.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

View File

@@ -11,6 +11,10 @@ mybatis:
spring:
application:
name: microservice-provider-user
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver