Source

Grails Spring Security Taobao / grails-app / conf / Config.groovy


// configuration for plugin testing - will not be included in the plugin zip
 
log4j = {
    // Example of changing the log pattern for the default console
    // appender:
    //
    
    root {
        info 'stdout'
    }
    appenders {
        console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
    }

    error  'org.codehaus.groovy.grails.web.servlet',  //  controllers
           'org.codehaus.groovy.grails.web.pages', //  GSP
           'org.codehaus.groovy.grails.web.sitemesh', //  layouts
           'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
           'org.codehaus.groovy.grails.web.mapping', // URL mapping
           'org.codehaus.groovy.grails.commons', // core / classloading
           'org.codehaus.groovy.grails.plugins', // plugins
           'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
           'org.springframework',
           'org.hibernate',
           'net.sf.ehcache.hibernate',
		   'org.springframework.security',
		   'com.mingidea.security',
		   'grails.plugins.springsecurity',
		   'org.codehaus.groovy.grails.plugins.springsecurity'

    warn   'org.mortbay.log'

    debug 'com.mingidea'
}

grails.plugins.springsecurity.expiredUrl = '/expired'

// Added by the Spring Security Core plugin:
grails.plugins.springsecurity.useHttpSessionEventPublisher = true 
grails.plugins.springsecurity.userLookup.userDomainClassName = 'test.User'
grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'test.UserRole'
grails.plugins.springsecurity.authority.className = 'test.Role'
grails.plugins.springsecurity.taobao.accountDomainClassName = 'test.TaobaoAccount'


//test_app_1的appkey 和 appscert
grails.plugins.springsecurity.taobao.appSecretMap = ['12264981' : '4aaaabc0a7057c3fd36b8de889d4aa65']

grails.plugins.springsecurity.securityConfigType = "InterceptUrlMap"
grails.plugins.springsecurity.interceptUrlMap = [
    '/secure/**':    ['ROLE_USER'],
    '/admin**':   ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY']
 ]
grails.views.default.codec="none" // none, html, base64
grails.views.gsp.encoding="UTF-8"