简体   繁体   中英

Grails default rest controller

Is there any way to specify default version of REST controller? Lets say that we have mapping like

"/test"(version: '1.0.0', resources: "test", namespace: 'v1')
"/test"(version: '2.0.0', resources: "test", namespace: 'v2')

and versioning is resolved with usage of http header.

If no header is specified 2.0.0 is going to be used. Is there any way to enforce version 1.0.0 in such case?

Grails实现了语义版本控制,因此版本号最高的那个是第一个

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM