Grails 获取application.yum中配置参数

阅读更多

Grails 获取application.yum中配置参数

 

application.yum配置如下:

 

map:

    request:

        key: '12345678123456781234567812345678'

        url: 'https://www.baidu.com'

 

cotroller中获取方式:

def requestURL = grailsApplication.config.getProperty('map.request.url')

def requestKEY = grailsApplication.config.getProperty('map.request.key')

 

你可能感兴趣的:(Grails 获取application.yum中配置参数)