Springboot配置properties出现中文乱码解决办法

解决办法

  • 首先,对配置文件添加utf-8配置
  • 对IDEA进行配置Springboot配置properties出现中文乱码解决办法_第1张图片
    注意这里的 Default encoding for properties

问题二:springboot警告:ApplicationContext is unlikely to start due to a @ComponentScan of the default package
该警告解释为 : ApplicationContext 不能从一个组件的默认包启动
既然他说该类不能从组件的默认包启动,那就给他建立一个包好了。
Springboot配置properties出现中文乱码解决办法_第2张图片

你可能感兴趣的:(spring,springboot,中文乱码)