lkqm/spring-api-versioning

how to work this dependency

baggrek opened this issue · 5 comments

im try set properties like

Version API

api.version.type=uri
api.version.uri-prefix=/api
api.version.uri-location=begin

Controller

@RestController
@RequestMapping("/config")
@apiversion("1")

after call api not found with base_url/v1/api/config

lkqm commented

Please confirm whether to restart the class to add annotation: @EnableApiVersioning ? like above:

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

thank for support, this is config and my version spring 2.5.3

Screen Shot 2021-09-18 at 11 48 59 AM

lkqm commented

Current supports spring boot 2.3.9.RELEASE, 2.5.3 maybe not work, I will test it and fix

thanks for support

lkqm commented

In your case, the right url is: /api/v1/config