spring-boot框架
@RestController
@EnableAutoConfiguration
@RequestMapping("/userCon")
public class DbController {
private static Logger logger = LogManager.getLogger(DbController.class);
@RequestMapping(value = "/testMongoDB",produces="application/json;charset=UTF-8")
public JSONObject testMongoDB(){
logger.debug("test");
System.out.println("hello!");
JSONObject jsonObject = new JSONObject();
jsonObject.put("test", "test");
System.out.println(jsonObject);
return jsonObject;
}
}
不太清楚这是为什么,哪位大佬能帮忙解释一下,拜托拜托