質問

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