Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以从 JavaLite.io Activeweb 控制器返回原始响应,而无需将其与嵌入式 FreeMarker 模板引擎链接?
是的,这很容易:
public void index() { respond("{\"success\":true}").contentType("application/json").statusCode(200); }
换句话说,该方法respond()将完全满足您的需求。
respond()