当前位置: 首页 > article >正文

Unsatisfied dependency expressed through bean property ‘sqlSessionTemplate‘;

 代码没有问题,但是启动运行报错

2023-10-25 16:59:38.165  INFO 228964 --- [           main] c.h.h.HailiaowenanApplication            : Starting HailiaowenanApplication on ganluhua with PID 228964 (D:\ganluhua\code\java\hailiao-java\target\classes started by 80913 in D:\ganluhua\code\java\hailiao-java)
2023-10-25 16:59:38.166  INFO 228964 --- [           main] c.h.h.HailiaowenanApplication            : No active profile set, falling back to default profiles: default
2023-10-25 16:59:38.210  INFO 228964 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3f91b517: startup date [Wed Oct 25 16:59:38 CST 2023]; root of context hierarchy
2023-10-25 16:59:39.015  INFO 228964 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2023-10-25 16:59:39.207  WARN 228964 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wxOrderMapper' defined in file [D:\ganluhua\code\java\hailiao-java\target\classes\com\hi\hailiaowenan\wxpay\mapper\WxOrderMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration]: No default constructor found; nested exception instantiate java.lang.NoSuchMethodException: org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.<init>()

原因,jdk没有在系统配置中配置正确

配置指引

VScode 运行Java - 简书

按住win+R,输入cmd

输入java,应为如下显示:

输入javac,应为如下显示:


 


http://www.kler.cn/a/105089.html

相关文章:

  • OpenCV视频车流量识别详解与实践
  • 服务容错框架Sentinel入门
  • PyTorch JIT和TorchScript,一个API提升推理性能50%
  • 13 结构性模式-装饰器模式
  • AGENS算法c++实现
  • Windows客户端下pycharm配置跳板机连接内网服务器
  • Oracle通过透明网关查询SQL Server 报错ORA-00904
  • Nginx安装配置项目部署然后加SSL
  • ORACLE表空间说明及操作
  • Java基础总结
  • 第12章 PyTorch图像分割代码框架-1
  • 宝塔Python3.7安装模块报错ModuleNotFoundError: No module named ‘Crypto‘解决办法
  • Java即时通讯源码 IM即时通讯系统源码
  • 【组合计数】CF1866 H
  • 【Qt之QtConcurrent】描述及使用
  • 【2024秋招】2023-10-9 同花顺后端笔试题
  • ubuntu下Docker的简单使用并利用主机显示
  • 笔记43:ResNet 结构详解
  • 关于集群和分布式部署
  • 渗透测试工具-sqlmap使用