I'm using Grails 2.3.6.

I have generated my controllers and views using:

grails generate-all com.mypackage.mydomainclass

I would like to disable automatic JSON/XML marshalling for domain objects and implement only my own services.

I have tried adding the following to my controller:

static responseFormats = ['html']

And it seems to work, is it the proper way?

Thanks.

没有正确的解决方案

其他提示

Based on the documentation, it looks like you are correct. Athough, it looks like they generally use it to extend support for other types by adding more types, whereas you are using it to limit.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top