| 
					
				 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.fs.framework.config; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.fs.common.utils.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.ibatis.io.VFS; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.apache.ibatis.session.SqlSessionFactory; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -27,7 +28,7 @@ import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * Mybatis支持*匹配扫描包 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- *  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @Configuration 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -115,18 +116,18 @@ public class MyBatisConfig 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Bean 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public SqlSessionFactory sqlSessionFactorys(DataSource dataSource) throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String mapperLocations = env.getProperty("mybatis.mapperLocations"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String configLocation = env.getProperty("mybatis.configLocation"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String typeAliasesPackage = env.getProperty("mybatis-plus.typeAliasesPackage"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String mapperLocations = env.getProperty("mybatis-plus.mapperLocations"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String configLocation = env.getProperty("mybatis-plus.configLocation"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         VFS.addImplClass(SpringBootVFS.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sessionFactory.setDataSource(dataSource); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sessionFactory.setTypeAliasesPackage(typeAliasesPackage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ","))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return sessionFactory.getObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |