|
@@ -16,7 +16,6 @@ import java.util.Properties;
|
|
|
|
|
|
@Configuration
|
|
|
@ConditionalOnBean({SqlSessionFactory.class})
|
|
|
-@AutoConfigureAfter({MybatisAutoConfiguration.class})
|
|
|
public class SwitchEnSqlInterceptorConfig {
|
|
|
|
|
|
@Autowired
|
|
@@ -29,14 +28,12 @@ public class SwitchEnSqlInterceptorConfig {
|
|
|
|
|
|
@PostConstruct
|
|
|
public void addPageInterceptor() {
|
|
|
- System.out.println("进入拦截器配置SwitchEnSqlInterceptorConfig-------------------------------------------------");
|
|
|
SwitchEnSqlInterceptor interceptor = new SwitchEnSqlInterceptor();
|
|
|
Iterator var3 = this.sqlSessionFactoryList.iterator();
|
|
|
Properties properties = new Properties();
|
|
|
interceptor.setProperties( properties);
|
|
|
while(var3.hasNext()) {
|
|
|
SqlSessionFactory sqlSessionFactory = (SqlSessionFactory)var3.next();
|
|
|
- System.out.println("加入拦截器到配置-------------------------------------------------");
|
|
|
sqlSessionFactory.getConfiguration().addInterceptor(interceptor);
|
|
|
}
|
|
|
|