• org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping


    org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping  

    原因:yml文件格式错误,此文件要求严格要求格式

    如节点没有对齐,将Mybatis节点与Spring节点对齐,下面是SpringBoot2.0+Mybatis+Mysql的yml配置文件

    server:
      port: 8080
    spring:
      datasource:
               name: daducha
               type: com.alibaba.druid.pool.DruidDataSource
               druid:
                    url: jdbc:mysql://127.0.0.1:3306/daducha
                    username: root
                    password: root
                    maxActive: 20
                    initialSize: 1
                    maxWait: 60000
                    minIdle: 1
                    timeBetweenEvictionRunsMillis: 60000
                    minEvictableIdleTimeMillis: 300000
                    testWhileIdle: true
                    testOnBorrow: false
                    testOnReturn: false
                    poolPreparedStatements: true
                    maxOpenPreparedStatements: 20
                    driver-class-name: com.mysql.jdbc.Driver
    mybatis:
      mapper-locations: classpath:mapping/*.xml
      type-aliases-package: com.wuji.entity.po

     

  • 相关阅读:
    MFC中获取系统当前时间
    我的定时关机程序(MFC实现) .
    编写一个闹钟和定时关机工具(MFC VS2010)
    Spark-SQL之DataFrame操作
    RDD操作
    Scala之Object (apply) dycopy
    Intellij IDEA 快捷键整理(dyCopy)
    python第三方包的windows安装文件exe格式
    pythong 中的 __call__
    触发器学习笔记(:new,:old用法)
  • 原文地址:https://www.cnblogs.com/javajiuyangzhenjing/p/10210587.html
Copyright © 2020-2023  润新知