Welcome Guest.


Spring boot Log print Chinese garbled

Asked by: Lisa Smith 181 views Software August 9, 2018

Create a spring boot project when the console log output is tomcat to start Chinese garbled, but use the main method to start Chinese display which is the normal god to guide

======== =========================================================

controller class method

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind .annotation.ResponseBody;



public class AdminController {

Logger logger = LoggerFactory.getLogger(NodeController. Class);




    public Object selAdmin(HttpServletRequest req){

logger.info("Chinese log garbled");

return "";




======================= ==================================================================== Use the spring boot  main method to start printing Normal

=================================================== =============

But when Chinese starts with tomcat, it is garbled

Please ask the gods to guide the maze

1 Answers

  1. +6Votes  


    Christopher Lewis- August 9, 2018 |