문제

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