标签:grails
grails2.3.x创建plugin时,默认的Config.groovy只有简单的log设置,这时候,页面添加数据之后,正确的逻辑是show新增的数据,但却变成404,需要在Config.groovy中增加以下代码:
grails.mime.types = [ // the first one is the default format
all: ‘*/*‘, // ‘all‘ maps to ‘*‘ or the first available format in withFormat
atom: ‘application/atom+xml‘,
css: ‘text/css‘,
csv: ‘text/csv‘,
form: ‘application/x-www-form-urlencoded‘,
html: [‘text/html‘,‘application/xhtml+xml‘],
js: ‘text/javascript‘,
json: [‘application/json‘, ‘text/json‘],
multipartForm: ‘multipart/form-data‘,
rss: ‘application/rss+xml‘,
text: ‘text/plain‘,
hal: [‘application/hal+json‘,‘application/hal+xml‘],
xml: [‘text/xml‘, ‘application/xml‘]
]
grails.views.default.codec = "html"
grails.converters.encoding = "UTF-8"
但不理解,为什么以下代码能让list页面显示空白,在webapp中不存在这样的问题。
grails.scaffolding.templates.domainSuffix = ‘Instance‘
grails2.3.x创建插件,gsp页面不能正确显示内容,布布扣,bubuko.com
标签:grails
原文地址:http://xiaosa.blog.51cto.com/665033/1436090