`
boogie
  • 浏览: 237388 次
  • 性别: Icon_minigender_1
  • 来自: 宁波
社区版块
存档分类
最新评论

The main advantage of using the Spring DSL

阅读更多

The main advantage of using the Spring DSL is that you can now mix logic in within your bean definitions, for example based on the environment :

import grails.util.*

beans {
	switch(GrailsUtil.environment) {
		case "production":
			myBean(my.company.MyBeanImpl) {
				bookService = ref("bookService")
			}
                break 
                case "development": 
                        myBean(my.company.mock.MockImpl) { 
                               bookService = ref("bookService") 
                        }
                break 
        } 
}
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics