From 29f5825e22f8ed6cc2019511ad75a4939bafb6a8 Mon Sep 17 00:00:00 2001
From: lyfO_o <764716047@qq.com>
Date: Sat, 06 May 2023 16:00:35 +0800
Subject: [PATCH] 用户token 过滤链判断限制
---
safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java
index cb05d9e..e2bef6c 100644
--- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java
+++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java
@@ -1,7 +1,5 @@
package com.gkhy.safePlatform.config.database;
-import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.plugin.Interceptor;
@@ -23,7 +21,7 @@
import java.util.Arrays;
@Configuration
-@MapperScan(basePackages = {"com.gkhy.safePlatform.goalManage"},
+@MapperScan(basePackages = {"com.gkhy.safePlatform.targetDuty"},
sqlSessionTemplateRef = "sqlTemplateGoalManage",annotationClass =
Repository.class)
public class MyBatisConfigGoalManage {
@@ -35,22 +33,16 @@
@Autowired
private MybatisPlusInterceptor mybatisPlusInterceptor;
- @Bean(name = "dataSourceGoalManage")
- @ConfigurationProperties(prefix = "spring.datasource.goalmanage")
- public DruidDataSource dataSourceGoalManage(){
- return DruidDataSourceBuilder.create().build();
- }
-
@Bean(name = "sqlFactoryGoalManage")
- public SqlSessionFactory sqlSessionFactory(@Qualifier("dataSourceGoalManage") DruidDataSource dataSource)
+ public SqlSessionFactory sqlSessionFactory()
throws Exception
{
MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
- factoryBean.setDataSource(dataSource);
+ factoryBean.setDataSource(dsGoalManage);
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
//-------------------
- Resource[] rs1 = resolver.getResources("classpath*:config/mapper/goalManage/**Mapper.xml");
+ Resource[] rs1 = resolver.getResources("classpath*:config/mapper/goalManage/**/**Mapper.xml");
// Resource[] rs2 = resolver.getResources("classpath*:config/mapper/goalManage/**Mapper.xml");
ArrayList<Resource> resourceArrayList = new ArrayList<>(Arrays.asList(rs1));
// resourceArrayList.addAll(new ArrayList<>(Arrays.asList(rs2)));
--
Gitblit v1.9.2