所有服务接入Nacos服务发现
This commit is contained in:
@@ -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);
|
||||
|
@@ -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.*;
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user