SpringBoot中提示Could not autowire. No beans of ‘xxx’ type found和Unable to find a @SpringBootC..的解决办法

问题描述

@autowired 爆红的一种情况

没有将springboot的启动类放在包的根目录中

解决方法

将SpringBoot的启动类放到项目包的根目录下

image-20220228103017651

原文链接

springboot整合oracle问题

java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK

问题描述

使用mybatis 代码生成器时遇到这个问题

解决方法

导入 orai18n.jar

1
2
3
4
5
<dependency>
<groupId>cn.easyproject</groupId>
<artifactId>orai18n</artifactId>
<version>${orai18n.version}</version>
</dependency>