spring boot创建新工程运行报错解决方案

[问题出现原因]

问题出现在创建spring Initializr创建新工程时选择myBatis问题.

该类问题一般出现在application.properties配置文件问题.

选择对应的mysql、JDBC、MyBatis等持久层.这时就必须在application.properties文件中加入如下配置:

# ���ݿ��������úϲ�
spring.datasource.url=jdbc:mysql://192.168.43.134:3306/plan_plat?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
#�����շ�������
mybatis.configuration.map-underscore-to-camel-case=true
#��ӡsql�����־
logging.level.com.lxj.cache.mapper=debug
#����������profilesѡ���޹� ���xmlλ��
mybatis.typeAliasesPackage=cn.net.csit.platformclouddeviceaccess.domain,cn.net.csit.platformcloudsystem.model 填写自己的包路径.
mybatis.mapperLocations=classpath:mapper/*.xml,classpath:mybatis-mappers/*.xml
#redis��������
spring.redis.host=192.168.43.134
#page��ҳ����
#pagehelper.dialect=mysqlע��ȥ��
pagehelper.reasonable=true
pagehelper.support-methods-arguments=true
pagehelper.params=count=countSql
token.expire.seconds=7200
token.jwtSecret=(XIAO:)_$^11244^%$_(WEI:)_@@++--(LAO:)_++++_.sds_(SHI:)'
files.path=${file-path:d:/files}

server.port=8096

增加如上代码后在编译运行就应该可以了.技术使我疯狂,努力成为技术总监

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值