-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
I downloaded a template project from the official website, added the SmallRey OpenAPI extension, added the @tag annotation to the Rest class, and used Chinese. When I accessed /q/openapi, the response was in garbled format. I guessed that the project was in UTF-8 format. Finally, I tried all the places where I could set the encoding format to UTF-8, but it still didn't match the Chinese display.
Implementation ideas
If you have any implementation ideas, they can go here, however please note that all design change proposals should be posted to the Quarkus developer mailing list (or the corresponding Google Group; see the decisions process document for more information. However, it is normal for the REST request response result to be displayed in Chinese.
@Path("/hello")
@Tag(name = "测试模块")
public class ExampleResource {
private static final Logger log = LoggerFactory.getLogger(ExampleResource.class);
@Inject
EntityManager entityManager;
@POST
@Path("/1")
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
String s = new String("".getBytes(StandardCharsets.UTF_8));
List<User> result = entityManager.createQuery("select e from User e", User.class).getResultList();
log.info("{}", result);
return "success哈哈哈哈";
}
}Implementation ideas
No response