fix: fix component scan error
This commit is contained in:
@@ -21,8 +21,8 @@ import tk.mybatis.spring.annotation.MapperScan;
|
|||||||
@EnableCaching
|
@EnableCaching
|
||||||
//@EnableDiscoveryClient
|
//@EnableDiscoveryClient
|
||||||
//@EnableFeignClients
|
//@EnableFeignClients
|
||||||
@MapperScan(basePackages = "com.hcframe.**.dao")
|
@MapperScan(basePackages = "com.taixingyiji.**.dao")
|
||||||
@ComponentScan(basePackages = {"com.hcframe.**"},excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
|
@ComponentScan(basePackages = {"com.taixingyiji.**"},excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
|
||||||
public class ActivitiApplication {
|
public class ActivitiApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
// 配置tk.mybatis参数及通用mapper,指定sqlSession工厂Bean
|
// 配置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",
|
sqlSessionFactoryRef = "sqlSessionFactoryBean222",
|
||||||
markerInterface = MyMapper.class //指定tkmybatis 中的通用mapper
|
markerInterface = MyMapper.class //指定tkmybatis 中的通用mapper
|
||||||
)
|
)
|
||||||
// 配置mybatis参数,指定sqlSession工厂Bean
|
// 配置mybatis参数,指定sqlSession工厂Bean
|
||||||
@MapperScan(basePackages = "com.hcframe.**.dao",sqlSessionFactoryRef = "sqlSessionFactoryBean222")
|
@MapperScan(basePackages = "com.taixingyiji.**.dao",sqlSessionFactoryRef = "sqlSessionFactoryBean222")
|
||||||
@EnableConfigurationProperties(MybatisProperties.class)
|
@EnableConfigurationProperties(MybatisProperties.class)
|
||||||
public class DataSourceConfiguration {
|
public class DataSourceConfiguration {
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@EnableFeignClients
|
@EnableFeignClients
|
||||||
//@EnableCasClient
|
//@EnableCasClient
|
||||||
@ComponentScan(basePackages = {"com.hcframe.**"})
|
@ComponentScan(basePackages = {"com.taixingyiji.**"})
|
||||||
public class ConfigApplication {
|
public class ConfigApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(ConfigApplication.class, args);
|
SpringApplication.run(ConfigApplication.class, args);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.hcframe.es;
|
package com.taixingyiji.es;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
@@ -16,7 +16,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||||||
@EnableCaching
|
@EnableCaching
|
||||||
//@EnableDiscoveryClient
|
//@EnableDiscoveryClient
|
||||||
//@EnableFeignClients
|
//@EnableFeignClients
|
||||||
@ComponentScan(basePackages = {"com.hcframe.**"})
|
@ComponentScan(basePackages = {"com.taixingyiji.**"})
|
||||||
public class EsApplication {
|
public class EsApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.hcframe.es;
|
package com.taixingyiji.es;
|
||||||
|
|
||||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.hcframe.es.annotation;
|
package com.taixingyiji.es.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
@@ -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.cache.CacheService;
|
||||||
import com.taixingyiji.base.module.datasource.utils.DataSourceUtil;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -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.dao.FtUserDao;
|
||||||
import com.taixingyiji.base.module.auth.entity.FtUser;
|
import com.taixingyiji.base.module.auth.entity.FtUser;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.hcframe.es.controller;
|
package com.taixingyiji.es.controller;
|
||||||
|
|
||||||
import com.taixingyiji.base.common.ResultVO;
|
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.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.hcframe.es.entity;
|
package com.taixingyiji.es.entity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.hcframe.es.esmapper;
|
package com.taixingyiji.es.esmapper;
|
||||||
|
|
||||||
import org.elasticsearch.action.search.SearchResponse;
|
import org.elasticsearch.action.search.SearchResponse;
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.hcframe.es.esmapper.impl;
|
package com.taixingyiji.es.esmapper.impl;
|
||||||
|
|
||||||
import com.taixingyiji.base.common.ServiceException;
|
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.SearchRequest;
|
||||||
import org.elasticsearch.action.search.SearchResponse;
|
import org.elasticsearch.action.search.SearchResponse;
|
||||||
import org.elasticsearch.client.RequestOptions;
|
import org.elasticsearch.client.RequestOptions;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.hcframe.es.service;
|
package com.taixingyiji.es.service;
|
||||||
|
|
||||||
|
|
||||||
import com.taixingyiji.base.common.ResultVO;
|
import com.taixingyiji.base.common.ResultVO;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.hcframe.es.service.impl;
|
package com.taixingyiji.es.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.taixingyiji.base.common.ResultVO;
|
import com.taixingyiji.base.common.ResultVO;
|
||||||
import com.hcframe.es.esmapper.EsMapper;
|
import com.taixingyiji.es.esmapper.EsMapper;
|
||||||
import com.hcframe.es.service.SearchService;
|
import com.taixingyiji.es.service.SearchService;
|
||||||
import org.elasticsearch.action.search.SearchResponse;
|
import org.elasticsearch.action.search.SearchResponse;
|
||||||
import org.elasticsearch.common.text.Text;
|
import org.elasticsearch.common.text.Text;
|
||||||
import org.elasticsearch.search.SearchHit;
|
import org.elasticsearch.search.SearchHit;
|
||||||
@@ -29,7 +29,7 @@ public class CasGatewayClientConfig {
|
|||||||
|
|
||||||
public String ignoreUrlPatternType="REGEX";
|
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";
|
public String authKey="X-Access-Token";
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||||||
@EnableCaching
|
@EnableCaching
|
||||||
//@EnableDiscoveryClient
|
//@EnableDiscoveryClient
|
||||||
//@EnableFeignClients
|
//@EnableFeignClients
|
||||||
@ComponentScan(basePackages = {"com.hcframe.**"})
|
@ComponentScan(basePackages = {"com.taixingyiji.**"})
|
||||||
public class TestApplication {
|
public class TestApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import tk.mybatis.spring.annotation.MapperScan;
|
|||||||
@EnableSwagger2
|
@EnableSwagger2
|
||||||
@ServletComponentScan
|
@ServletComponentScan
|
||||||
@EnableCaching
|
@EnableCaching
|
||||||
@MapperScan(basePackages = "com.hcframe.**.dao")
|
@MapperScan(basePackages = "com.taixingyiji.**.dao")
|
||||||
@ComponentScan(basePackages = {"com.hcframe.**"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
|
@ComponentScan(basePackages = {"com.taixingyiji.**"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {DataSourceConfiguration.class}))
|
||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@Import(CasClientConfigurationProperties.class)
|
@Import(CasClientConfigurationProperties.class)
|
||||||
//@EnableCasClient
|
//@EnableCasClient
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class OprateLog {
|
|||||||
this.tableService = tableService;
|
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 {
|
public Object aroundAdvice(ProceedingJoinPoint pjp) throws Throwable {
|
||||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||||
assert attributes != null;
|
assert attributes != null;
|
||||||
|
|||||||
Reference in New Issue
Block a user