zoukankan      html  css  js  c++  java
  • spring cloud zuul

    server:
      port: 9000
    zuul:
      routes:
        source:
          url: http://localhost:8080
    

      

    @SpringBootApplication
    @EnableZuulProxy
    public class RouterApp {
    
    	public static void main(String[] args) {
    		SpringApplication.run(RouterApp.class, args);
    	}
    
    }
    

      

    @SpringBootApplication
    @RestController
    public class SourceApp {
    
    	public static void main(String[] args) {
    		SpringApplication.run(SourceApp.class, args);
    	}
    	
    	@RequestMapping(value = "/hello/{name}", method = RequestMethod.GET)
    	public String hello(@PathVariable String name) {
    		return "hello, " + name;
    	}
    
    }
    

      http://localhost:9000/source/hello/dd

  • 相关阅读:
    菜根谭#39
    菜根谭#38
    菜根谭#37
    菜根谭#36
    菜根谭#35
    菜根谭#34
    菜根谭#33
    菜根谭#32
    mysqli的使用
    mysql常用修改创建语句
  • 原文地址:https://www.cnblogs.com/zfzf1/p/8552647.html
Copyright © 2011-2022 走看看