fix: fix component scan error

This commit is contained in:
lhc
2023-12-06 14:23:49 +08:00
parent 50d4496a70
commit 805cf9e6fd
18 changed files with 26 additions and 27 deletions

View File

@@ -21,8 +21,8 @@ import tk.mybatis.spring.annotation.MapperScan;
@EnableCaching
//@EnableDiscoveryClient
//@EnableFeignClients
@MapperScan(basePackages = "com.hcframe.**.dao")
@ComponentScan(basePackages = {"com.hcframe.**"},excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
@MapperScan(basePackages = "com.taixingyiji.**.dao")
@ComponentScan(basePackages = {"com.taixingyiji.**"},excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
public class ActivitiApplication {
public static void main(String[] args) {

View File

@@ -29,12 +29,12 @@ import java.util.Map;
*/
@Configuration
// 配置tk.mybatis参数及通用mapper,指定sqlSession工厂Bean
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.hcframe.**.dao", //这里扫描dao层的接口
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.taixingyiji.**.dao", //这里扫描dao层的接口
sqlSessionFactoryRef = "sqlSessionFactoryBean222",
markerInterface = MyMapper.class //指定tkmybatis 中的通用mapper
)
// 配置mybatis参数指定sqlSession工厂Bean
@MapperScan(basePackages = "com.hcframe.**.dao",sqlSessionFactoryRef = "sqlSessionFactoryBean222")
@MapperScan(basePackages = "com.taixingyiji.**.dao",sqlSessionFactoryRef = "sqlSessionFactoryBean222")
@EnableConfigurationProperties(MybatisProperties.class)
public class DataSourceConfiguration {

View File

@@ -19,7 +19,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableDiscoveryClient
@EnableFeignClients
//@EnableCasClient
@ComponentScan(basePackages = {"com.hcframe.**"})
@ComponentScan(basePackages = {"com.taixingyiji.**"})
public class ConfigApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigApplication.class, args);

View File

@@ -1,4 +1,4 @@
package com.hcframe.es;
package com.taixingyiji.es;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -16,7 +16,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableCaching
//@EnableDiscoveryClient
//@EnableFeignClients
@ComponentScan(basePackages = {"com.hcframe.**"})
@ComponentScan(basePackages = {"com.taixingyiji.**"})
public class EsApplication {
public static void main(String[] args) {

View File

@@ -1,4 +1,4 @@
package com.hcframe.es;
package com.taixingyiji.es;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

View File

@@ -1,4 +1,4 @@
package com.hcframe.es.annotation;
package com.taixingyiji.es.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@@ -1,7 +1,6 @@
package com.hcframe.es.config;
package com.taixingyiji.es.config;
import com.taixingyiji.base.module.cache.CacheService;
import com.taixingyiji.base.module.datasource.utils.DataSourceUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -1,4 +1,4 @@
package com.hcframe.es.config;
package com.taixingyiji.es.config;
import com.taixingyiji.base.module.auth.dao.FtUserDao;
import com.taixingyiji.base.module.auth.entity.FtUser;

View File

@@ -1,7 +1,7 @@
package com.hcframe.es.controller;
package com.taixingyiji.es.controller;
import com.taixingyiji.base.common.ResultVO;
import com.hcframe.es.service.SearchService;
import com.taixingyiji.es.service.SearchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;

View File

@@ -1,4 +1,4 @@
package com.hcframe.es.entity;
package com.taixingyiji.es.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;

View File

@@ -1,4 +1,4 @@
package com.hcframe.es.esmapper;
package com.taixingyiji.es.esmapper;
import org.elasticsearch.action.search.SearchResponse;

View File

@@ -1,7 +1,7 @@
package com.hcframe.es.esmapper.impl;
package com.taixingyiji.es.esmapper.impl;
import com.taixingyiji.base.common.ServiceException;
import com.hcframe.es.esmapper.EsMapper;
import com.taixingyiji.es.esmapper.EsMapper;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions;

View File

@@ -1,4 +1,4 @@
package com.hcframe.es.service;
package com.taixingyiji.es.service;
import com.taixingyiji.base.common.ResultVO;

View File

@@ -1,9 +1,9 @@
package com.hcframe.es.service.impl;
package com.taixingyiji.es.service.impl;
import com.alibaba.fastjson.JSON;
import com.taixingyiji.base.common.ResultVO;
import com.hcframe.es.esmapper.EsMapper;
import com.hcframe.es.service.SearchService;
import com.taixingyiji.es.esmapper.EsMapper;
import com.taixingyiji.es.service.SearchService;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.text.Text;
import org.elasticsearch.search.SearchHit;

View File

@@ -29,7 +29,7 @@ public class CasGatewayClientConfig {
public String ignoreUrlPatternType="REGEX";
public String cookieHolderPattern="com.hcframe.gateway_cas_stater.data.DataStorageImpl";
public String cookieHolderPattern="com.taixingyiji.gateway_cas_stater.data.DataStorageImpl";
public String authKey="X-Access-Token";

View File

@@ -16,7 +16,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableCaching
//@EnableDiscoveryClient
//@EnableFeignClients
@ComponentScan(basePackages = {"com.hcframe.**"})
@ComponentScan(basePackages = {"com.taixingyiji.**"})
public class TestApplication {
public static void main(String[] args) {

View File

@@ -20,8 +20,8 @@ import tk.mybatis.spring.annotation.MapperScan;
@EnableSwagger2
@ServletComponentScan
@EnableCaching
@MapperScan(basePackages = "com.hcframe.**.dao")
@ComponentScan(basePackages = {"com.hcframe.**"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
@MapperScan(basePackages = "com.taixingyiji.**.dao")
@ComponentScan(basePackages = {"com.taixingyiji.**"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
@EnableDiscoveryClient
@Import(CasClientConfigurationProperties.class)
//@EnableCasClient

View File

@@ -55,7 +55,7 @@ public class OprateLog {
this.tableService = tableService;
}
@Around("@annotation(com.hcframe.base.module.log.annotation.LogAnno)")
@Around("@annotation(com.taixingyiji.base.module.log.annotation.LogAnno)")
public Object aroundAdvice(ProceedingJoinPoint pjp) throws Throwable {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
assert attributes != null;