SqlMapConfig.xml core configuration file used to configure the label

properties Label: This label can load external properties file

<properties resource="jdbc.properties"></properties>

typeAliases Label: Alias ​​Set Type

<typeAlias type="com.juanxincai.domain.User" alias="user"></typeAlias>

mappers Tags: Load map configuration

<mapper resource="com/juanxincai/mapper/UserMapping.xml"></mapper>

Tags environments: environment configuration data source tag

    <environments default="development">        
        <environment id="development">            
            <transactionManager type="JDBC"/>            
            <dataSource type="POOLED">                
                <property name="driver" value="com.mysql.jdbc.Driver"/>
                <property name="url" value="jdbc:mysql:///test"/>                
                <property name="username" value="root"/>
                <property name="password" value="root"/>            
            </dataSource>        
        </environment>    
    </environments> 

Guess you like

Origin www.cnblogs.com/juanxincai/p/12049697.html