org.apache.ibatis.executor.ExecutionPlaceholder cannot be cast to java.util.List
时间: 2024-06-03 19:12:09
浏览: 26
This error occurs when you try to cast an object of type org.apache.ib[ati](https://geek.csdn.net/educolumn/150d7073277950db5f09620704e791cf?spm=1055.2569.3001.10083)s.[executor](https://geek.csdn.net/educolumn/566e7c26c9421a641f601efb455fcd63?dp_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NDQ0MDg2MiwiZXhwIjoxNzA3MzcxOTM4LCJpYXQiOjE3MDY3NjcxMzgsInVzZXJuYW1lIjoid2VpeGluXzY4NjQ1NjQ1In0.RrTYEnMNYPC7AQdoij4SBb0kKEgHoyvF-bZOG2eGQvc&spm=1055.2569.3001.10083).ExecutionPlaceholder to a List. This is because ExecutionPlaceholder is not a List, but a placeholder object used by [mybatis](https://geek.csdn.net/edu/47a0da7218b411332ba4349ff5e2a4c2?dp_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NDQ0MDg2MiwiZXhwIjoxNzA3MzcxOTM4LCJpYXQiOjE3MDY3NjcxMzgsInVzZXJuYW1lIjoid2VpeGluXzY4NjQ1NjQ1In0.RrTYEnMNYPC7AQdoij4SBb0kKEgHoyvF-bZOG2eGQvc&spm=1055.2569.3001.10083) to represent a result that has not yet been fetched from the database.
To resolve this error, you need to ensure that you are using the correct type for the object you are trying to cast. If you are expecting a List, make sure that the query you are executing returns a List of objects.
You can also check the documentation for the [mybatis](https://geek.csdn.net/edu/47a0da7218b411332ba4349ff5e2a4c2?dp_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NDQ0MDg2MiwiZXhwIjoxNzA3MzcxOTM4LCJpYXQiOjE3MDY3NjcxMzgsInVzZXJuYW1lIjoid2VpeGluXzY4NjQ1NjQ1In0.RrTYEnMNYPC7AQdoij4SBb0kKEgHoyvF-bZOG2eGQvc&spm=1055.2569.3001.10083) API to see what types of objects are returned by different methods, and make sure that you are using the correct methods and [han](https://geek.csdn.net/educolumn/0d22b54eaf6bcf967d9625e1679d00b4?spm=1055.2569.3001.10083)dling the returned