问题:

org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'ID' from result set.  Cause: java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK
### The error may exist in file [E:\RunProject\IdeaProjects\demo\CrudDemo\target\classes\mapper\AdminInfoMapper.xml]
### The error may involve com.example.cruddemo.mapper.AdminInfoMapper.getAdminInfo
### The error occurred while handling results
### SQL: select *from admin_info
### Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'ID' from result set.  Cause: java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK

 

解决方案:添加如下依赖

<!-- https://mvnrepository.com/artifact/com.oracle.database.nls/orai18n -->
<dependency>
    <groupId>com.oracle.database.nls</groupId>
    <artifactId>orai18n</artifactId>
    <version>21.1.0.0</version>
</dependency>

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐