配置文件

class.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap      
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"      
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap>
<resultMap class="com.lxit.struts.tree.bean.pojo.Classlist" id="class">
	<result property="id" column="id"/>
	<result property="name" column="name"/>
	<result property="course" column="course"/>
</resultMap>
	<select id="selectTableClass" resultMap="class">
		select id,name,course from class
	</select>
	<select id="selectCountClass" resultClass="java.lang.Long">
		select count(id) from class
	</select>
	<insert id="insertClass" parameterClass="com.lxit.struts.tree.bean.pojo.Classlist">
		insert into class values(#id#,#name#,#course#)
	</insert>
	<update id="updateClass" parameterClass="com.lxit.struts.tree.bean.pojo.Classlist">
		update class set name=#name#,course=#course# where id=#id#
	</update>
</sqlMap>

log4j

#Created by JInto - www.guh-software.de
#Wed Sep 16 22:13:23 CST 2009
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.SimpleLayout
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=D\:FiveTeam_Log4j.txt
log4j.appender.file.MaxBackupIndex=20
log4j.appender.file.MaxFileSize=1000KB
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.rootLogger=debug,file

purview.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap      
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"      
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap>
<resultMap class="com.lxit.struts.tree.bean.pojo.Purview" id="purview">
	<result property="id" column="id"/>
	<result property="name" column="name"/>
	<result property="purview" column="purview"/>
	<result property="leaf" column="leaf"/>
</resultMap>
	<select id="selectTablePurview" resultMap="purview" parameterClass="java.lang.String">
		select id,name,purview,leaf from purview where rootId=#rootId#
	</select>
</sqlMap>

SqlMapConfig.xml

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMapConfig      
    PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"      
    "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">

<sqlMapConfig>
	<settings 
		cacheModelsEnabled="true" 
		enhancementEnabled="true" 
		lazyLoadingEnabled="true" 
		errorTracingEnabled="true" 
		maxRequests="32" 
		maxSessions="10" 
		maxTransactions="5" 
		useStatementNamespaces="true" 
	/>
	
	<transactionManager type="JDBC" commitRequired="false">
		<dataSource type="SIMPLE">
			<property name="JDBC.Driver" value="com.mysql.jdbc.Driver" />
			<property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost:3306/a" />
			<property name="JDBC.Username" value="root" />
			<property name="JDBC.Password" value="root" />
			<property name="Pool.MaximumActiveConnections" value="10" />
			<property name="Pool.MaximumIdleConnections" value="5" />
			<property name="Pool.MaximumCheckoutTime" value="120000" />
			<property name="Pool.TimeToWait" value="500" />
			<property name="Pool.PingEnabled" value="false" />
			<property name="Pool.PingConnectionsOlderThan" value="1" />
			<property name="Pool.PingConnectionsNotUsedFor" value="1" />
		</dataSource> 
	</transactionManager>
	<sqlMap resource="purview.xml"/>
	<sqlMap resource="class.xml"/>
</sqlMapConfig>

adapter

pkgs

resources

src

ux

welcome

ext-all.js

相关推荐