明点软件 avatar 明点软件 committed 439636b

upgrade to grails 2.0 and spring-security-core 1.2.7

Comments (0)

Files changed (9)

SpringSecurityTaobaoGrailsPlugin.groovy

     // the version or versions of Grails the plugin is designed for
     def grailsVersion = "1.3.7 > *"
     // the other plugins this plugin depends on
-    def dependsOn = [springSecurityCore: '1.1.2 > *']
+    def dependsOn = [springSecurityCore: '1.2.7 > *']
     // resources that are excluded from plugin packaging
     List pluginExcludes = [
         'grails-app/domain/**',

application.properties

 #Grails Metadata file
 #Tue May 17 14:52:50 CST 2011
-app.grails.version=1.3.7
+app.grails.version=2.0.0
 app.name=spring-security-taobao
-plugins.hibernate=1.3.7
-plugins.tomcat=1.3.7
-plugins.spring-security-core=1.1.2
+plugins.hibernate=2.0.0
+plugins.tomcat=2.0.0
+plugins.spring-security-core=1.2.7

grails-app/conf/Config.groovy

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

grails-app/conf/DataSource.groovy

-dataSource {
-    pooled = true
-    driverClassName = "org.hsqldb.jdbcDriver"
-    username = "sa"
-    password = ""
-}
-hibernate {
-    cache.use_second_level_cache = true
-    cache.use_query_cache = true
-    cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
-}
-// environment specific settings
-environments {
-    development {
-        dataSource {
-            dbCreate = "create-drop" // one of 'create', 'create-drop','update'
-            url = "jdbc:hsqldb:mem:devDB"
-        }
-    }
-    test {
-        dataSource {
-            dbCreate = "update"
-            url = "jdbc:hsqldb:mem:testDb"
-        }
-    }
-    production {
-        dataSource {
-            dbCreate = "update"
-            url = "jdbc:hsqldb:file:prodDb;shutdown=true"
-        }
-    }
-}
+dataSource {
+	pooled = true
+	driverClassName = "org.h2.Driver"
+	username = "sa"
+	password = ""
+}
+hibernate {
+	cache.use_second_level_cache = true
+	cache.use_query_cache = true
+	cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
+}
+// environment specific settings
+environments {
+	development {
+		dataSource {
+			dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
+			url = "jdbc:h2:mem:devDb;MVCC=TRUE"
+		}
+	}
+	test {
+		dataSource {
+			dbCreate = "update"
+			url = "jdbc:h2:mem:testDb;MVCC=TRUE"
+		}
+	}
+	production {
+		dataSource {
+			dbCreate = "update"
+			url = "jdbc:h2:prodDb;MVCC=TRUE"
+			pooled = true
+			properties {
+			   maxActive = -1
+			   minEvictableIdleTimeMillis=1800000
+			   timeBetweenEvictionRunsMillis=1800000
+			   numTestsPerEvictionRun=3
+			   testOnBorrow=true
+			   testWhileIdle=true
+			   testOnReturn=true
+			   validationQuery="SELECT 1"
+			}
+		}
+	}
+}
     <resource>test.UserRole</resource>
   </resources>
   <dependencies>
-    <plugin name='springSecurityCore' version='1.1.2 &gt; *' />
+    <plugin name='springSecurityCore' version='1.2.7 &gt; *' />
   </dependencies>
   <behavior />
 </plugin>

web-app/WEB-INF/applicationContext.xml

 
 	<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
 		<description>Grails application factory bean</description>
-        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
-        <property name="grailsResourceLoader" ref="grailsResourceLoader" />
+		<property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
+		<property name="grailsResourceLoader" ref="grailsResourceLoader" />
 	</bean>
 
 	<bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
 		<description>A bean that manages Grails plugins</description>
-        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
-        <property name="application" ref="grailsApplication" />
+		<property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
+		<property name="application" ref="grailsApplication" />
 	</bean>
 
-    <bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
-        <constructor-arg>
-            <ref bean="grailsApplication" />
-        </constructor-arg>
-        <property name="pluginManager" ref="pluginManager" />
-    </bean>
+	<bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
+		<constructor-arg>
+			<ref bean="grailsApplication" />
+		</constructor-arg>
+		<property name="pluginManager" ref="pluginManager" />
+	</bean>
 
-    <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean">
-        <property name="grailsResourceHolder" ref="grailsResourceHolder" />
-    </bean>
+	<bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean" />
 
-    <bean id="grailsResourceHolder" scope="prototype" class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">
-        <property name="resources">
-              <value>classpath*:**/grails-app/**/*.groovy</value>
-        </property>
-    </bean>    
-    
-   <bean id="characterEncodingFilter"
-      class="org.springframework.web.filter.CharacterEncodingFilter">
-        <property name="encoding">
-          <value>utf-8</value>
-        </property>
-   </bean>    	
+	<bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
+		<property name="encoding">
+			<value>utf-8</value>
+		</property>
+	</bean>
 </beans>

web-app/WEB-INF/sitemesh.xml

         <parser content-type="text/html;charset=ISO-8859-1"
             class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
         <parser content-type="text/html;charset=UTF-8"
-            class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />            
+            class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
     </page-parsers>
 
     <decorator-mappers>

web-app/WEB-INF/tld/c.tld

 <?xml version="1.0" encoding="UTF-8" ?>
 
-<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
-    version="2.0">
-    
-  <description>JSTL 1.1 core library</description>
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+    version="2.1">
+
+  <description>JSTL 1.2 core library</description>
   <display-name>JSTL core</display-name>
-  <tlib-version>1.1</tlib-version>
+  <tlib-version>1.2</tlib-version>
   <short-name>c</short-name>
   <uri>http://java.sun.com/jsp/jstl/core</uri>
 
         <description>
 Name of the exported scoped variable for the
 resulting value of the test condition. The type
-of the scoped variable is Boolean.        
+of the scoped variable is Boolean.
         </description>
         <name>var</name>
         <required>false</required>
 	<required>false</required>
 	<rtexprvalue>true</rtexprvalue>
 	<type>java.lang.Object</type>
+        <deferred-value>
+	    <type>java.lang.Object</type>
+        </deferred-value>
     </attribute>
     <attribute>
         <description>
 	<required>true</required>
 	<rtexprvalue>true</rtexprvalue>
 	<type>java.lang.String</type>
+        <deferred-value>
+	    <type>java.lang.String</type>
+        </deferred-value>
     </attribute>
     <attribute>
         <description>
   <tag>
     <description>
         Like &lt;%= ... &gt;, but for expressions.
-    </description> 
+    </description>
     <name>out</name>
     <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
     <body-content>JSP</body-content>
         <name>value</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
+        <deferred-value>
+	    <type>java.lang.Object</type>
+        </deferred-value>
     </attribute>
     <attribute>
         <description>

web-app/WEB-INF/tld/fmt.tld

 <?xml version="1.0" encoding="UTF-8" ?>
 
-<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
-    version="2.0">
-    
-  <description>JSTL 1.1 i18n-capable formatting library</description>
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+    version="2.1">
+
+  <description>JSTL 1.2 i18n-capable formatting library</description>
   <display-name>JSTL fmt</display-name>
-  <tlib-version>1.1</tlib-version>
+  <tlib-version>1.2</tlib-version>
   <short-name>fmt</short-name>
   <uri>http://java.sun.com/jsp/jstl/fmt</uri>
 
 country code (as defined by ISO-3166).
 Language and country codes must be
 separated by hyphen (-) or underscore
-(_).        
+(_).
 	</description>
         <name>value</name>
         <required>true</required>
         <description>
 Specifies whether the time, the date, or both
 the time and date components of the given
-date are to be formatted. 
+date are to be formatted.
         </description>
         <name>type</name>
         <required>false</required>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.