├── .gitignore ├── README.md ├── reverse-proxy ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── cn │ │ └── demo │ │ └── reverseProxy │ │ └── Application.java └── pom.xml ├── service0 ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── cn │ │ └── demo │ │ └── service0 │ │ ├── Application.java │ │ └── controller │ │ └── Service0Controller.java └── pom.xml ├── registry ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── cn │ │ └── demo │ │ └── discovery │ │ └── Application.java └── pom.xml ├── config-server ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── cn │ │ └── demo │ │ └── configServer │ │ └── Application.java └── pom.xml ├── service1 ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── cn │ │ └── demo │ │ ├── service1 │ │ ├── Application.java │ │ ├── client │ │ │ ├── Service0Client.java │ │ │ └── fallback │ │ │ │ └── factory │ │ │ │ └── Service0FallbackFactory.java │ │ └── controller │ │ │ └── Service1Controller.java │ │ └── AbstractController.java └── pom.xml ├── pom.xml └── test.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | *.iml 3 | .idea/ 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spring-cloud-demo 2 | A Demo Of Spring Cloud 3 | -------------------------------------------------------------------------------- /reverse-proxy/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | eureka: 2 | client: 3 | serviceUrl: 4 | defaultZone: http://localhost:8080/eureka/ 5 | spring: 6 | application: 7 | name: gateway 8 | server: 9 | port: 8083 10 | zuul: 11 | routes: 12 | service0: /service/0/** 13 | service1: /service/1/** 14 | 15 | -------------------------------------------------------------------------------- /service0/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: service0 4 | eureka: 5 | client: 6 | serviceUrl: 7 | defaultZone: http://localhost:8080/eureka/ #注册中心地址 8 | instance: 9 | hostname: localhost 10 | instance-id: http://localhost:8081 11 | server: 12 | port: 8081 13 | -------------------------------------------------------------------------------- /registry/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 # 注册中心占用8080端口 3 | eureka: 4 | instance: 5 | hostname: localhost 6 | client: 7 | registerWithEureka: false 8 | fetchRegistry: false 9 | serviceUrl: 10 | defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ #其实就是 http://localhost:8080/eureka/ 11 | -------------------------------------------------------------------------------- /config-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8084 3 | spring: 4 | application: 5 | name: config-center 6 | cloud: 7 | config: 8 | server: 9 | git: 10 | uri: file:///${user.home}/config-repo 11 | searchPaths: '{application}' #搜索各个以服务名命名的文件夹下的所有yml 12 | eureka: 13 | instance: 14 | hostname: localhost 15 | instance-id: localhost:8084 16 | client: 17 | serviceUrl: 18 | defaultZone: http://127.0.0.1:8080/eureka/ #注册中心地址 -------------------------------------------------------------------------------- /service0/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-demo 7 | demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | service0 13 | 14 | 15 | -------------------------------------------------------------------------------- /service1/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: service1 4 | eureka: 5 | client: 6 | serviceUrl: 7 | defaultZone: http://localhost:8080/eureka/ #注册中心地址 8 | instance: 9 | hostname: localhost 10 | instance-id: http://localhost:8082 11 | server: 12 | port: 8082 #service0 占用8082 13 | hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 40000 # feign 超时控制 14 | service0: 15 | ribbon: 16 | ReadTimeout: 1000 17 | ConnectTimeout: 500 18 | MaxAutoRetries: 1 # SR6版本,这里设为1,会重试3次,重试次数还和另外的两个值有关 19 | -------------------------------------------------------------------------------- /registry/src/main/java/cn/demo/discovery/Application.java: -------------------------------------------------------------------------------- 1 | package cn.demo.discovery; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; 6 | 7 | /** 8 | * @Author: Leo 9 | * @Blog: http://blog.csdn.net/lc0817 10 | * @CreateTime: 2016/11/21 22:49 11 | * @Description: 12 | */ 13 | @SpringBootApplication 14 | @EnableEurekaServer 15 | public class Application { 16 | public static void main(String[] args) { 17 | SpringApplication.run(Application.class, args); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /reverse-proxy/src/main/java/cn/demo/reverseProxy/Application.java: -------------------------------------------------------------------------------- 1 | package cn.demo.reverseProxy; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 6 | import org.springframework.cloud.netflix.zuul.EnableZuulProxy; 7 | 8 | /** 9 | * @Author: Leo 10 | * @Blog: http://blog.csdn.net/lc0817 11 | * @CreateTime: 2016/11/22 21:32 12 | * @Description: 13 | */ 14 | @SpringBootApplication 15 | @EnableZuulProxy 16 | @EnableEurekaClient 17 | public class Application { 18 | public static void main(String[] args) { 19 | SpringApplication.run(Application.class, args); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /config-server/src/main/java/cn/demo/configServer/Application.java: -------------------------------------------------------------------------------- 1 | package cn.demo.configServer; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.config.server.EnableConfigServer; 6 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 7 | 8 | /** 9 | * @Author: Leo 10 | * @Blog: http://blog.csdn.net/lc0817 11 | * @CreateTime: 2016/12/4 22:52 12 | * @Description: 13 | */ 14 | @SpringBootApplication 15 | @EnableConfigServer 16 | @EnableEurekaClient 17 | public class Application { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(Application.class, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /service0/src/main/java/cn/demo/service0/Application.java: -------------------------------------------------------------------------------- 1 | package cn.demo.service0; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 6 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 7 | 8 | /** 9 | * @Author: Leo 10 | * @Blog: http://blog.csdn.net/lc0817 11 | * @CreateTime: 2016/11/21 23:01 12 | * @Description: 13 | */ 14 | @SpringBootApplication(scanBasePackages = "cn.demo.service0") 15 | @EnableEurekaClient 16 | @EnableWebMvc 17 | public class Application { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(Application.class, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /reverse-proxy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-demo 7 | demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | gateway 13 | 14 | 15 | 16 | org.springframework.cloud 17 | spring-cloud-starter-zuul 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /config-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-demo 7 | demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | config-server 13 | 14 | 15 | 16 | org.springframework.cloud 17 | spring-cloud-config-server 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /registry/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-demo 7 | demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | registry 13 | 14 | 15 | 16 | org.springframework.cloud 17 | spring-cloud-starter-eureka-server 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /service1/src/main/java/cn/demo/service1/Application.java: -------------------------------------------------------------------------------- 1 | package cn.demo.service1; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; 6 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 7 | import org.springframework.cloud.netflix.feign.EnableFeignClients; 8 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 9 | 10 | /** 11 | * @Author: Leo 12 | * @Blog: http://blog.csdn.net/lc0817 13 | * @CreateTime: 2016/11/21 23:01 14 | * @Description: 15 | */ 16 | @SpringBootApplication(scanBasePackages = "cn.demo.service1") 17 | @EnableFeignClients 18 | @EnableWebMvc 19 | @EnableEurekaClient 20 | @EnableCircuitBreaker 21 | public class Application { 22 | 23 | public static void main(String[] args) { 24 | SpringApplication.run(Application.class, args); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /service1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-demo 7 | demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | service1 13 | 14 | 15 | 16 | org.springframework.cloud 17 | spring-cloud-starter-hystrix 18 | 19 | 20 | com.alibaba 21 | fastjson 22 | 1.2.24 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /service1/src/main/java/cn/demo/AbstractController.java: -------------------------------------------------------------------------------- 1 | package cn.demo; 2 | 3 | import org.springframework.web.bind.annotation.ExceptionHandler; 4 | import org.springframework.web.context.request.WebRequest; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | /** 10 | * @Author: Leo 11 | * @Blog: http://blog.csdn.net/lc0817 12 | * @CreateTime: 2017/3/27 10:47 13 | * @Description: 统一异常处理, 将controller继承该类, 即可. 14 | */ 15 | public abstract class AbstractController { 16 | 17 | 18 | @ExceptionHandler({Exception.class}) 19 | public Map exceptionHandler(Exception e, WebRequest req) { 20 | System.err.println("================="); 21 | System.err.println(req.toString()); 22 | System.err.println(req.getRemoteUser()); 23 | System.err.println(req.getContextPath()); 24 | System.err.println("============="); 25 | Map map = new HashMap<>(); 26 | map.put("code", "0"); 27 | map.put("msg", e.getMessage()); 28 | return map; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /service1/src/main/java/cn/demo/service1/client/Service0Client.java: -------------------------------------------------------------------------------- 1 | package cn.demo.service1.client; 2 | 3 | import cn.demo.service1.client.fallback.factory.Service0FallbackFactory; 4 | import cn.demo.service1.controller.Service1Controller; 5 | import org.springframework.cloud.netflix.feign.FeignClient; 6 | import org.springframework.web.bind.annotation.PathVariable; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RequestMethod; 9 | 10 | /** 11 | * @Author: Leo 12 | * @Blog: http://blog.csdn.net/lc0817 13 | * @CreateTime: 2017/1/19 12:28 14 | * @Description: 15 | */ 16 | @FeignClient(name = "service0", fallbackFactory = Service0FallbackFactory.class) 17 | public interface Service0Client { 18 | 19 | @RequestMapping(method = RequestMethod.GET, path = "user/{userId}/{sleepSec}") 20 | String test( 21 | @PathVariable("userId") String userId, 22 | @PathVariable("sleepSec") int sleepSec 23 | ); 24 | 25 | @RequestMapping( 26 | method = RequestMethod.GET, 27 | path = "test" 28 | ) 29 | String user( 30 | Service1Controller.User user 31 | ); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /service1/src/main/java/cn/demo/service1/client/fallback/factory/Service0FallbackFactory.java: -------------------------------------------------------------------------------- 1 | package cn.demo.service1.client.fallback.factory; 2 | 3 | import cn.demo.service1.client.Service0Client; 4 | import cn.demo.service1.controller.Service1Controller; 5 | import feign.hystrix.FallbackFactory; 6 | import org.springframework.stereotype.Component; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | 9 | /** 10 | * @Author: Leo 11 | * @Blog: http://blog.csdn.net/lc0817 12 | * @CreateTime: 2017/3/22 14:44 13 | * @Description: 14 | */ 15 | @Component 16 | public class Service0FallbackFactory implements FallbackFactory { 17 | 18 | @Override 19 | public Service0Client create(final Throwable cause) { 20 | System.out.println("create:" + cause); 21 | return new Service0Client() { 22 | @Override 23 | public String test(@PathVariable("userId") String userId, @PathVariable("sleepSec") int sleepSec) { 24 | return "create fallback:" + userId + "," + sleepSec; 25 | } 26 | 27 | @Override 28 | public String user(Service1Controller.User user) { 29 | return "create fallback:" + user.toString(); 30 | } 31 | }; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | demo 8 | spring-cloud-demo 9 | pom 10 | 1.0-SNAPSHOT 11 | 12 | 13 | registry 14 | service0 15 | service1 16 | reverse-proxy 17 | config-server 18 | 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-parent 24 | 1.4.5.RELEASE 25 | 26 | 27 | 28 | 29 | 30 | org.springframework.cloud 31 | spring-cloud-dependencies 32 | Camden.SR6 33 | pom 34 | import 35 | 36 | 37 | 38 | 39 | 40 | 41 | org.springframework.cloud 42 | spring-cloud-starter-config 43 | 44 | 45 | org.springframework.cloud 46 | spring-cloud-starter-eureka 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-devtools 51 | true 52 | 53 | 54 | org.springframework.cloud 55 | spring-cloud-starter-feign 56 | 57 | 58 | org.springframework.boot 59 | spring-boot-starter-actuator 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /service0/src/main/java/cn/demo/service0/controller/Service0Controller.java: -------------------------------------------------------------------------------- 1 | package cn.demo.service0.controller; 2 | 3 | import org.springframework.web.bind.annotation.*; 4 | 5 | import java.util.concurrent.TimeUnit; 6 | 7 | /** 8 | * @Author: Leo 9 | * @Blog: http://blog.csdn.net/lc0817 10 | * @CreateTime: 2017/1/19 12:13 11 | * @Description: 12 | */ 13 | @RestController 14 | public class Service0Controller { 15 | public static class User { 16 | private int id; 17 | private String name; 18 | 19 | private Student student; 20 | 21 | public User() { 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public User setId(int id) { 29 | this.id = id; 30 | return this; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public User setName(String name) { 38 | this.name = name; 39 | return this; 40 | } 41 | 42 | public Student getStudent() { 43 | return student; 44 | } 45 | 46 | public User setStudent(Student student) { 47 | this.student = student; 48 | return this; 49 | } 50 | 51 | @Override 52 | public String toString() { 53 | return "User{" + 54 | "id=" + id + 55 | ", name='" + name + '\'' + 56 | ", student=" + student + 57 | '}'; 58 | } 59 | } 60 | 61 | public static class Student { 62 | private String stuName; 63 | 64 | public Student() { 65 | } 66 | 67 | public String getStuName() { 68 | return stuName; 69 | } 70 | 71 | public Student setStuName(String stuName) { 72 | this.stuName = stuName; 73 | return this; 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | return "Student{" + 79 | "stuName='" + stuName + '\'' + 80 | '}'; 81 | } 82 | } 83 | 84 | /** 85 | * 用于测试ribbon 重试机制 86 | */ 87 | int count = 0; 88 | 89 | @GetMapping("user/{userId}/{sleepSec}") 90 | String user( 91 | @PathVariable String userId, 92 | @PathVariable int sleepSec 93 | ) { 94 | try { 95 | System.out.println("hello:" + userId); 96 | count++; 97 | TimeUnit.SECONDS.sleep(sleepSec - count); 98 | return "hello:" + userId; 99 | } catch (Exception e) { 100 | e.printStackTrace(); 101 | return e.getMessage(); 102 | } 103 | } 104 | 105 | @PostMapping("test") 106 | String post( 107 | @RequestBody User user 108 | ) { 109 | System.out.println(user.toString()); 110 | return user.toString(); 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /service1/src/main/java/cn/demo/service1/controller/Service1Controller.java: -------------------------------------------------------------------------------- 1 | package cn.demo.service1.controller; 2 | 3 | import cn.demo.AbstractController; 4 | import cn.demo.service1.client.Service0Client; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | /** 11 | * @Author: Leo 12 | * @Blog: http://blog.csdn.net/lc0817 13 | * @CreateTime: 2017/1/19 14:21 14 | * @Description: 15 | */ 16 | @RestController 17 | public class Service1Controller extends AbstractController { 18 | public static class User { 19 | private int id; 20 | private String name; 21 | 22 | private Student student; 23 | 24 | public User() { 25 | } 26 | 27 | public int getId() { 28 | return id; 29 | } 30 | 31 | public User setId(int id) { 32 | this.id = id; 33 | return this; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public User setName(String name) { 41 | this.name = name; 42 | return this; 43 | } 44 | 45 | public Student getStudent() { 46 | return student; 47 | } 48 | 49 | public User setStudent(Student student) { 50 | this.student = student; 51 | return this; 52 | } 53 | 54 | @Override 55 | public String toString() { 56 | return "User{" + 57 | "id=" + id + 58 | ", name='" + name + '\'' + 59 | ", student=" + student + 60 | '}'; 61 | } 62 | } 63 | 64 | public static class Student { 65 | private String stuName; 66 | 67 | public Student() { 68 | } 69 | 70 | public String getStuName() { 71 | return stuName; 72 | } 73 | 74 | public Student setStuName(String stuName) { 75 | this.stuName = stuName; 76 | return this; 77 | } 78 | 79 | @Override 80 | public String toString() { 81 | return "Student{" + 82 | "stuName='" + stuName + '\'' + 83 | '}'; 84 | } 85 | } 86 | 87 | @Autowired 88 | Service0Client service0Client; 89 | 90 | @GetMapping("/test/{sleepSec}") 91 | public String test( 92 | @PathVariable int sleepSec 93 | ) { 94 | // if (1 == 1) { 95 | // System.out.println(333); 96 | // throw new RuntimeException("111111111111"); 97 | // } 98 | return service0Client.test("leo", sleepSec); 99 | } 100 | 101 | @GetMapping("user") 102 | public String test() { 103 | // if (1 == 1) { 104 | // System.out.println(333); 105 | // throw new RuntimeException("111111111111"); 106 | // } 107 | Student stuName = new Student() 108 | .setStuName("stuName"); 109 | User asd = new User() 110 | .setId(0) 111 | .setName("asd") 112 | .setStudent(stuName); 113 | 114 | System.out.println(asd.toString()); 115 | return service0Client.user(asd); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /test.json: -------------------------------------------------------------------------------- 1 | { 2 | "/webjars/**": { 3 | "bean": "resourceHandlerMapping" 4 | }, 5 | "/**": { 6 | "bean": "resourceHandlerMapping" 7 | }, 8 | "/**/favicon.ico": { 9 | "bean": "faviconHandlerMapping" 10 | }, 11 | "{[/encrypt],methods=[POST]}": { 12 | "bean": "requestMappingHandlerMapping", 13 | "method": "public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.encrypt(java.lang.String,org.springframework.http.MediaType)" 14 | }, 15 | "{[/encrypt/{name}/{profiles}],methods=[POST]}": { 16 | "bean": "requestMappingHandlerMapping", 17 | "method": "public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.encrypt(java.lang.String,java.lang.String,java.lang.String,org.springframework.http.MediaType)" 18 | }, 19 | "{[/decrypt],methods=[POST]}": { 20 | "bean": "requestMappingHandlerMapping", 21 | "method": "public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.decrypt(java.lang.String,org.springframework.http.MediaType)" 22 | }, 23 | "{[/decrypt/{name}/{profiles}],methods=[POST]}": { 24 | "bean": "requestMappingHandlerMapping", 25 | "method": "public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.decrypt(java.lang.String,java.lang.String,java.lang.String,org.springframework.http.MediaType)" 26 | }, 27 | "{[/key],methods=[GET]}": { 28 | "bean": "requestMappingHandlerMapping", 29 | "method": "public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.getPublicKey()" 30 | }, 31 | "{[/key/{name}/{profiles}],methods=[GET]}": { 32 | "bean": "requestMappingHandlerMapping", 33 | "method": "public java.lang.String org.springframework.cloud.config.server.encryption.EncryptionController.getPublicKey(java.lang.String,java.lang.String)" 34 | }, 35 | "{[/encrypt/status],methods=[GET]}": { 36 | "bean": "requestMappingHandlerMapping", 37 | "method": "public java.util.Map org.springframework.cloud.config.server.encryption.EncryptionController.status()" 38 | }, 39 | "{[/{name}-{profiles}.properties],methods=[GET]}": { 40 | "bean": "requestMappingHandlerMapping", 41 | "method": "public org.springframework.http.ResponseEntity org.springframework.cloud.config.server.environment.EnvironmentController.properties(java.lang.String,java.lang.String,boolean) throws java.io.IOException" 42 | }, 43 | "{[/{name}/{profiles:.*[^-].*}],methods=[GET]}": { 44 | "bean": "requestMappingHandlerMapping", 45 | "method": "public org.springframework.cloud.config.environment.Environment org.springframework.cloud.config.server.environment.EnvironmentController.defaultLabel(java.lang.String,java.lang.String)" 46 | }, 47 | "{[/{name}-{profiles}.yml || /{name}-{profiles}.yaml],methods=[GET]}": { 48 | "bean": "requestMappingHandlerMapping", 49 | "method": "public org.springframework.http.ResponseEntity org.springframework.cloud.config.server.environment.EnvironmentController.yaml(java.lang.String,java.lang.String,boolean) throws java.lang.Exception" 50 | }, 51 | "{[/{label}/{name}-{profiles}.yml || /{label}/{name}-{profiles}.yaml],methods=[GET]}": { 52 | "bean": "requestMappingHandlerMapping", 53 | "method": "public org.springframework.http.ResponseEntity org.springframework.cloud.config.server.environment.EnvironmentController.labelledYaml(java.lang.String,java.lang.String,java.lang.String,boolean) throws java.lang.Exception" 54 | }, 55 | "{[/{name}/{profiles}/{label:.*}],methods=[GET]}": { 56 | "bean": "requestMappingHandlerMapping", 57 | "method": "public org.springframework.cloud.config.environment.Environment org.springframework.cloud.config.server.environment.EnvironmentController.labelled(java.lang.String,java.lang.String,java.lang.String)" 58 | }, 59 | "{[/{name}-{profiles}.json],methods=[GET]}": { 60 | "bean": "requestMappingHandlerMapping", 61 | "method": "public org.springframework.http.ResponseEntity org.springframework.cloud.config.server.environment.EnvironmentController.jsonProperties(java.lang.String,java.lang.String,boolean) throws java.lang.Exception" 62 | }, 63 | "{[/{label}/{name}-{profiles}.json],methods=[GET]}": { 64 | "bean": "requestMappingHandlerMapping", 65 | "method": "public org.springframework.http.ResponseEntity org.springframework.cloud.config.server.environment.EnvironmentController.labelledJsonProperties(java.lang.String,java.lang.String,java.lang.String,boolean) throws java.lang.Exception" 66 | }, 67 | "{[/{label}/{name}-{profiles}.properties],methods=[GET]}": { 68 | "bean": "requestMappingHandlerMapping", 69 | "method": "public org.springframework.http.ResponseEntity org.springframework.cloud.config.server.environment.EnvironmentController.labelledProperties(java.lang.String,java.lang.String,java.lang.String,boolean) throws java.io.IOException" 70 | }, 71 | "{[/error]}": { 72 | "bean": "requestMappingHandlerMapping", 73 | "method": "public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)" 74 | }, 75 | "{[/error],produces=[text/html]}": { 76 | "bean": "requestMappingHandlerMapping", 77 | "method": "public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)" 78 | }, 79 | "{[/env/{name:.*}],methods=[GET],produces=[application/json]}": { 80 | "bean": "endpointHandlerMapping", 81 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)" 82 | }, 83 | "{[/env || /env.json],methods=[GET],produces=[application/json]}": { 84 | "bean": "endpointHandlerMapping", 85 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 86 | }, 87 | "{[/trace || /trace.json],methods=[GET],produces=[application/json]}": { 88 | "bean": "endpointHandlerMapping", 89 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 90 | }, 91 | "{[/metrics/{name:.*}],methods=[GET],produces=[application/json]}": { 92 | "bean": "endpointHandlerMapping", 93 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)" 94 | }, 95 | "{[/metrics || /metrics.json],methods=[GET],produces=[application/json]}": { 96 | "bean": "endpointHandlerMapping", 97 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 98 | }, 99 | "{[/beans || /beans.json],methods=[GET],produces=[application/json]}": { 100 | "bean": "endpointHandlerMapping", 101 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 102 | }, 103 | "{[/health || /health.json],produces=[application/json]}": { 104 | "bean": "endpointHandlerMapping", 105 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)" 106 | }, 107 | "{[/dump || /dump.json],methods=[GET],produces=[application/json]}": { 108 | "bean": "endpointHandlerMapping", 109 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 110 | }, 111 | "{[/archaius || /archaius.json],methods=[GET],produces=[application/json]}": { 112 | "bean": "endpointHandlerMapping", 113 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 114 | }, 115 | "{[/pause || /pause.json],methods=[POST]}": { 116 | "bean": "endpointHandlerMapping", 117 | "method": "public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()" 118 | }, 119 | "{[/resume || /resume.json],methods=[POST]}": { 120 | "bean": "endpointHandlerMapping", 121 | "method": "public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()" 122 | }, 123 | "{[/env],methods=[POST]}": { 124 | "bean": "endpointHandlerMapping", 125 | "method": "public java.lang.Object org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.value(java.util.Map)" 126 | }, 127 | "{[/env/reset],methods=[POST]}": { 128 | "bean": "endpointHandlerMapping", 129 | "method": "public java.util.Map org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset()" 130 | }, 131 | "{[/info || /info.json],methods=[GET],produces=[application/json]}": { 132 | "bean": "endpointHandlerMapping", 133 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 134 | }, 135 | "{[/mappings || /mappings.json],methods=[GET],produces=[application/json]}": { 136 | "bean": "endpointHandlerMapping", 137 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 138 | }, 139 | "{[/restart || /restart.json],methods=[POST]}": { 140 | "bean": "endpointHandlerMapping", 141 | "method": "public java.lang.Object org.springframework.cloud.context.restart.RestartMvcEndpoint.invoke()" 142 | }, 143 | "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/json]}": { 144 | "bean": "endpointHandlerMapping", 145 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 146 | }, 147 | "{[/configprops || /configprops.json],methods=[GET],produces=[application/json]}": { 148 | "bean": "endpointHandlerMapping", 149 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 150 | }, 151 | "{[/features || /features.json],methods=[GET],produces=[application/json]}": { 152 | "bean": "endpointHandlerMapping", 153 | "method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()" 154 | }, 155 | "{[/refresh || /refresh.json],methods=[POST]}": { 156 | "bean": "endpointHandlerMapping", 157 | "method": "public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()" 158 | }, 159 | "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}": { 160 | "bean": "endpointHandlerMapping", 161 | "method": "public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException" 162 | } 163 | } --------------------------------------------------------------------------------