java /
                    
                    正文
                
                
                Expecting a 'Mapping' node but got ''如何解决
                            
                                2024-01-13 23:29
                            
                            3235 浏览
                        
                        
                                
                                    
                                    评论(0)
                                
                                
                        字体大小:
                                    
                                
                            这个错误就是节点没对齐 在报错的地方重新对齐一下就好了
yml 是通过节点来配置的,这个错误是说节点没有对齐,在报错的地方重新对齐一下就OK啦!
解决前:
解决后:
yml的源码
server: port: 8001 mybatis: config-location: classpath:mybatis/mybatis.cfg.xml # mybatis配置文件所在路径 type-aliases-package: com.yt.springcloud.entity # 所有饿entity实体类所在包 mapper-locations: - classpath:mybatis/mapper/**/*.xml # mapper映射文件 spring: application: name: microservicecloud-dept datasource: type: com.alibaba.dreid.pool.DruidDataSource # 当前数据源操作类型 driver-class-name: org.gjt.mm.mysql.Driver # mysql驱动包 url: jdbc:mysql://localhost:3306/cloudDB01 # 数据库名称 username: root password: hannong dbcp2: min-idle: 5 # 数据库连接池的最小维持连接数 initial-size: 5 # 初始化连接数 max-total: 5 # 最大连接数 max-wait-millis: 200 # 等待连接获取的最大超时时间
本文发布于程序达人 ,转载请注明出处,谢谢合作
有 0 人认为有用
                    0 评论
                    
                    共同学习,写下你的评论
相关热点文章推荐
SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe...
程序达人 - chengxudaren.com
一个帮助开发者成长的社区
相关文章
                

