@SpringBootApplication @MapperScan(value="com.youzi.mapper") @EnableSwagger2Doc
时间: 2024-04-21 15:25:24 浏览: 13
这是一个Spring Boot应用程序的注解配置。
- @SpringBootApplication:这个注解用于标记这是一个Spring Boot应用程序,并启用自动配置。
- @MapperScan:这个注解用于扫描MyBatis Mapper接口并创建它们的实现。
- @EnableSwagger2Doc:这个注解用于启用Swagger文档生成器,可以自动生成RESTful API文档。
相关问题
Description: Field guanggaoServiceClient in com.youzi.controller.GuanggaoController required a bean of type 'com.youzi.client.GuanggaoServiceClient' that could not be found. The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true) Action: Consider defining a bean of type 'com.youzi.client.GuanggaoServiceClient' in your configuration.
这个错误说明在com.youzi.controller.GuanggaoController中使用了一个类型为'com.youzi.client.GuanggaoServiceClient'的bean,但是该类型的bean没有被发现。通常情况下,这种错误是由于Spring容器没有正确配置或者没有正确扫描到该bean导致的。解决这个问题的方法是在配置文件中定义一个正确的bean或者确保该bean已经被正确扫描到。您可以检查一下您的代码和配置文件,并确保所有需要的bean都已经正确定义和扫描到。
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@19d1c2fe] 2023-06-06 14:04:50.458 ERROR 2804 --- [nio-8081-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.youzi.mapper.GuanggaoTypeMapper.selectById] with root cause org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.youzi.mapper.GuanggaoTypeMapper.selectById
这个错误信息显示在你的应用程序中出现了一个请求处理失败的异常,并且根本原因是一个绑定异常。异常信息显示 "Invalid bound statement (not found): com.youzi.mapper.GuanggaoTypeMapper.selectById",这意味着你的应用程序无法找到指定的绑定语句。这可能是因为语句的名称或路径不正确,或者语句没有被正确地加载到应用程序中。你需要检查你的代码和配置,确保绑定语句被正确定义和加载,以解决这个问题。同时,还需要注意关闭非事务性的 SqlSession,以避免潜在的资源泄漏问题。