spring+druid+mybatis samples
This commit is contained in:
		@@ -1,8 +1,6 @@
 | 
			
		||||
package com.heibaiying.dao;
 | 
			
		||||
 | 
			
		||||
import com.heibaiying.bean.Relation;
 | 
			
		||||
import org.apache.ibatis.annotations.Mapper;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -11,7 +9,7 @@ import java.util.List;
 | 
			
		||||
 * @description :
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Mapper
 | 
			
		||||
 | 
			
		||||
public interface MysqlDao {
 | 
			
		||||
 | 
			
		||||
    List<Relation> queryById(String id);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,6 @@
 | 
			
		||||
package com.heibaiying.dao;
 | 
			
		||||
 | 
			
		||||
import com.heibaiying.bean.Flow;
 | 
			
		||||
import org.apache.ibatis.annotations.Mapper;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -10,7 +8,7 @@ import java.util.List;
 | 
			
		||||
 * @author : heibaiying
 | 
			
		||||
 * @description :
 | 
			
		||||
 */
 | 
			
		||||
@Mapper
 | 
			
		||||
 | 
			
		||||
public interface OracleDao {
 | 
			
		||||
 | 
			
		||||
    List<Flow> queryById(long id);
 | 
			
		||||
 
 | 
			
		||||
@@ -28,6 +28,7 @@
 | 
			
		||||
    <!--配置 mybatis 会话工厂 -->
 | 
			
		||||
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
 | 
			
		||||
        <property name="dataSource" ref="dataSource"/>
 | 
			
		||||
        <!--指定mapper文件所在的位置-->
 | 
			
		||||
        <property name="mapperLocations" value="classpath*:/mappers/**/*.xml"/>
 | 
			
		||||
        <property name="configLocation" value="classpath:mybatisConfig.xml"/>
 | 
			
		||||
    </bean>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user