BuildConfig.groovy和Config.groovy有什么区别? [英] What is the difference between BuildConfig.groovy and Config.groovy?

查看:296
本文介绍了BuildConfig.groovy和Config.groovy有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Grails应用程序。为什么一些物业在一个而不是另一个物业中运作?什么时候我把属性放在一个,我什么时候把它们放在另一个?

解决方案

从Grails doc here


第一个
BuildConfig.groovy用于运行Grails
命令时使用的设置,例如compile,doc等。第二个文件Config.groovy
用于应用程序运行时使用的设置。这
表示Config.groovy与您的应用程序一起打包,但
BuildConfig.groovy不包含。



I have a grails app. Why do some properties work in one but not the other? When do I put properties in one and when do I put them in the other one?

解决方案

From Grails doc here

The first, BuildConfig.groovy, is for settings that are used when running Grails commands, such as compile, doc, etc. The second file, Config.groovy, is for settings that are used when your application is running. This means that Config.groovy is packaged with your application, but BuildConfig.groovy is not.

这篇关于BuildConfig.groovy和Config.groovy有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆