mirror of
https://github.com/ityouknow/spring-cloud-examples.git
synced 2025-12-08 19:25:55 +00:00
20 lines
558 B
Java
20 lines
558 B
Java
package com.neo.controller;
|
|
|
|
import com.neo.remote.HelloRemote;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@RestController
|
|
public class ConsumerController {
|
|
|
|
@Autowired
|
|
HelloRemote HelloRemote;
|
|
|
|
@RequestMapping("/hello/{name}")
|
|
public String index(@PathVariable("name") String name) {
|
|
return HelloRemote.hello(name);
|
|
}
|
|
|
|
} |