zoukankan      html  css  js  c++  java
  • 4-8 Provider内容准备

    演示剩余的两部分内容

    provider要有可供我们可调用的方法。provider里面我们直接写controller就可以了
    provider服务里面新建controller包,新建ProviderController


    
    
    package com.mooc.meetingfilm.provider.controller;

    import lombok.extern.slf4j.Slf4j;
    import org.springframework.beans.factory.annotation.Value;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;

    @RestController
    @Slf4j
    public class ProviderController {

    @Value("${server.port}")
    private int port;
    @RequestMapping(value="/provider/sayhello")
    public String providerSayHello(String message){
    log.error("provider sayhello port:{}, message:{}",port,message);
    return "Provider sayhello port:"+port+" , message:"+message;
    }
    }
     

    结束




     

  • 相关阅读:
    Rocket
    Rocket
    Rocket
    Rocket
    Rocket
    Rocket
    UVa 10534 DP LIS Wavio Sequence
    LA 4256 DP Salesmen
    HDU 2476 区间DP String painter
    HDU 4283 区间DP You Are the One
  • 原文地址:https://www.cnblogs.com/wangjunwei/p/12702325.html
Copyright © 2011-2022 走看看