代码仓库:
https://gitee.com/qq110611132...
出现问题截图:
报错信息(看得到文件的):
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configMapper' defined in file [D:\long2short_java\server\target\classes\com\long2short\server\mapper\ConfigMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory
检查:
D:\long2short_java\server\target\classes\com\long2short\server\mapper\ConfigMapper.class
检查结果:
文件存在
数据库表:
CREATE TABLE `config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`sitename` varchar(50) NOT NULL DEFAULT '' COMMENT '网站名称(页面内容中显示)',
`domain` varchar(50) NOT NULL DEFAULT '' COMMENT '网站域名(在页面内容和各种链接中使用)',
`is_open` int(1) NOT NULL DEFAULT '1' COMMENT '是否开启网站访问(0:不开启,1:开启)',
`refuse_tips` varchar(200) NOT NULL DEFAULT '' COMMENT '关站提示语',
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '网页标题(SEO 在 title 中使用)',
`keyword` varchar(100) NOT NULL DEFAULT '' COMMENT '网站关键字(SEO 在 keyword 中使用)',
`description` varchar(100) NOT NULL DEFAULT '' COMMENT '网站关键字(SEO 在 description 中使用)',
`qq` varchar(11) NOT NULL DEFAULT '' COMMENT '客服QQ',
`tel` varchar(13) NOT NULL DEFAULT '' COMMENT '网站电话',
`company` varchar(100) NOT NULL DEFAULT '' COMMENT '公司名称',
`address` varchar(100) NOT NULL DEFAULT '' COMMENT '公司地址',
`email` varchar(100) NOT NULL DEFAULT '' COMMENT '邮箱',
`icp` varchar(50) NOT NULL DEFAULT '' COMMENT 'ICP备案信息',
`copyright` varchar(100) NOT NULL DEFAULT '' COMMENT '公司信息',
`license` varchar(100) NOT NULL DEFAULT '' COMMENT '版权信息',
`baidu_tuisong` varchar(800) NOT NULL DEFAULT '' COMMENT '百度推送代码',
`baidu_verification` varchar(50) NOT NULL DEFAULT '' COMMENT '百度认证代码',
`stmp` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱stmp服务器的信息',
`stmp_email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱stmp邮箱地址',
`stmp_pwd` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱stmp邮箱密码',
`index_theme` varchar(20) NOT NULL DEFAULT '' COMMENT '网站前台模板',
`mobile_index_theme` varchar(20) NOT NULL DEFAULT '' COMMENT '手机前台模版',
`merchant_theme` varchar(20) NOT NULL DEFAULT '' COMMENT '商户后台模板',
`mobile_merchant_theme` varchar(20) NOT NULL DEFAULT '' COMMENT '手机商户后台模版',
`admin_theme` varchar(20) NOT NULL DEFAULT '' COMMENT '管理后台模版页面',
`is_register` int(1) NOT NULL DEFAULT '1' COMMENT '是否开启注册(0:不开启,1:开启,2:后台审核)',
`is_sms` int(1) NOT NULL DEFAULT '0' COMMENT '是否开启短信验证码注册(0:不开启,1:开启)',
`is_sms_check` int(1) NOT NULL DEFAULT '0' COMMENT '开启短信验证敏感操作(0:否;1:是)',
`is_wx` int(1) NOT NULL DEFAULT '0' COMMENT '开启微信公众号(0:否;1:是)',
`wx_appid` varchar(20) NOT NULL DEFAULT '' COMMENT '微信公众号appid',
`wx_secret` varchar(50) NOT NULL DEFAULT '' COMMENT '微信公众号appsecret',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
insert into `config`(`id`,`sitename`,`domain`,`is_open`,`refuse_tips`,`title`,`keyword`,`description`,`qq`,`tel`,`company`,`address`,`email`,`icp`,`copyright`,`license`,`baidu_tuisong`,`baidu_verification`,`stmp`,`stmp_email`,`stmp_pwd`,`index_theme`,`mobile_index_theme`,`merchant_theme`,`mobile_merchant_theme`,`admin_theme`,`is_register`,`is_sms`,`is_sms_check`,`is_wx`,`wx_appid`,`wx_secret`) values (1,'22222','2',1,'3','4','5','6','7','8','9','10','11','12','13','14','','','','','','','','','','',1,0,0,0,'','');
有jar包版本不会或者冲突了,应该是依赖加错了,参考这里