Sfoglia il codice sorgente

upgrade smart-servlet to 0.6-SNAPSHOT

三刀 1 anno fa
parent
commit
ed03c884c5

+ 1 - 1
frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/JsonServlet.java

@@ -16,7 +16,7 @@ import java.io.IOException;
 public class JsonServlet extends HttpServlet {
     @Override
     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-        resp.setContentType("application/json");
+        resp.setContentType("application/json;charset=UTF-8");
         resp.setBufferSize(0);
         JsonUtil.writeJsonBytes(resp, new Message("Hello, World!"));
     }