anyline-mvc禁用jdbc环境

最后更新:2023-10-18 19:49:01 | 状态:未完成
最近遇到有些项目需要anyline-mvc但不需要数据库环境
因为anyline-mvc的AnylineController中依赖了anyline-data-jdbc的ConfigStore,所以anylie-data-jdbc被依赖进来了,而anylie-data-jdbc中的DefaultDao引用了springjdbc的类
可以这样

@ComponentScan(basePackages = {"org.anyline"}
,excludeFilters = @ComponentScan.Filter(
type = FilterType.ASSIGNABLE_TYPE,
classes = {DefaultDao.class ,EnvironmentListener.class}//把加载异常的bean排除
)
)
或者把这个依赖加上

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>

最近更新 搜索 提交