Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder ‘pattern.dateformat‘ in

报错:Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'pattern.dateformat' in value "${pattern.dateformat}"

SpringCloud 项目整合 nacos 出现报错

首先 - - >  检查对应的yml 配置 文件

server:
  port: 8081
spring:
  application:
    name: user-service
  datasource:
    url: jdbc:mysql://localhost:3306/cloud_user?useSSL=false
    username: root
    password: 1234
    driver-class-name: com.mysql.jdbc.Driver
  #Naocs配置
  cloud:
    nacos:
      server-addr: localhost:8848
      config:
        file-extension: yml # 文件后缀名
      discovery:
        cluster-name: HZ
        namespace: public # 命名空间,填ID
    ribbon:
      NFLoadBalancerRuleClassName: com.alibaba.cloud.nacos.ribbon.NacosRule # 负载均衡规则
mybatis:
  type-aliases-package: cn.itcast.user.pojo
  configuration:
    map-underscore-to-camel-case: true
logging:
  level:
    cn.itcast: debug
  pattern:
    dateformat: MM-dd HH:mm:ss:SSS 

如果这里没有问题的情况下,看下自己网页链接的Nacos

需要在 

在nacos中添加配置文件.   然后启动

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder ‘pattern.dateformat‘ in_第1张图片  http://localhost:8848/nacosicon-default.png?t=N6B9http://localhost:8848/nacos/

 

你可能感兴趣的:(java,开发语言)