029 Step 19 - Exploring Internationalization for REST API
03 - Restful Web Services with Spring Boot - V2 Изменения кода для следующего шага - https://github.com/in28minutes/spring-microservices-v2/blob/main/02.restful-web-services/01-step-by-step-changes/v2.md#step-21 URLs Управление версиями URI V1: http://localhost:8080/v1/person @GetMapping("/v1/person") V2: http://localhost:8080/v2/person @GetMapping("/v2/person") Request Param Versioning V1: http://localhost:8080/person?version=1 @GetMapping(path = "/person", params = "version=1") V2: http://localhost:8080/person?version=2 @GetMapping(path = "/person", params = "version=2") Header Versioning V1: http://localhost:8080/person/header HEADER - X-API-VERSION:1 @GetMapping(path = "/person/header", headers = "X-API-VERSION=1") V2: http://localhost:8080/person/header HEADER - X-API-VERSION:2 @GetMapping(path = "/person/header", headers = "X-API-VERSION=2") Content Negotiation Versioning V1: http://localhost:8080/person/accept HEADER - Accept:application/vnd.company.app-v1+json @GetMapping(path = "/person/accept", produces = "application/vnd.company.app-v1+json") V2: http://localhost:8080/person/accept HEADER - Accept:application/vnd.company.app-v1+json @GetMapping(path = "/person/accept", produces = "application/vnd.company.app-v2+json") V1 Response { "name": "Bob Charlie" } V2 Response { "name": { "firstName": "Bob", "lastName": "Charlie" } }
03 - Restful Web Services with Spring Boot - V2 Изменения кода для следующего шага - https://github.com/in28minutes/spring-microservices-v2/blob/main/02.restful-web-services/01-step-by-step-changes/v2.md#step-21 URLs Управление версиями URI V1: http://localhost:8080/v1/person @GetMapping("/v1/person") V2: http://localhost:8080/v2/person @GetMapping("/v2/person") Request Param Versioning V1: http://localhost:8080/person?version=1 @GetMapping(path = "/person", params = "version=1") V2: http://localhost:8080/person?version=2 @GetMapping(path = "/person", params = "version=2") Header Versioning V1: http://localhost:8080/person/header HEADER - X-API-VERSION:1 @GetMapping(path = "/person/header", headers = "X-API-VERSION=1") V2: http://localhost:8080/person/header HEADER - X-API-VERSION:2 @GetMapping(path = "/person/header", headers = "X-API-VERSION=2") Content Negotiation Versioning V1: http://localhost:8080/person/accept HEADER - Accept:application/vnd.company.app-v1+json @GetMapping(path = "/person/accept", produces = "application/vnd.company.app-v1+json") V2: http://localhost:8080/person/accept HEADER - Accept:application/vnd.company.app-v1+json @GetMapping(path = "/person/accept", produces = "application/vnd.company.app-v2+json") V1 Response { "name": "Bob Charlie" } V2 Response { "name": { "firstName": "Bob", "lastName": "Charlie" } }




