gpt4 book ai didi

json - Grails:具有命名间隔约定的JSON View ?

转载 作者:行者123 更新时间:2023-12-02 15:18:36 25 4
gpt4 key购买 nike

典型的非JSON模板渲染使用命名约定来定位 View ,但是我无法将其与JSON View 一起使用。

示例类

class StrainsController extends ManagerController {
static namespace = "manager";

def edit() {
def model = []
respond([view: "/manager/strains/edit"], model)
}
}

文件夹结构
grails-app
views
manager
strains
edit.gson

理想情况下,我不必显式定义我的gson View 所在的位置,Grails在配置座右铭上的约定应该已经可以处理它。我需要启用一个特殊的配置选项才能使它正常工作吗?

Grails 3.2.8

JSON View 1.2.3

最佳答案

Is there a special configuration option I need to enable for this to work?



不,我希望对此没有支持。如果您在 https://github.com/grails/grails-views/issues提出问题,我们将进行调查。

感谢您的反馈。

关于json - Grails:具有命名间隔约定的JSON View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44664004/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com