使用Java 8 SDK时
if (SystemTray.isSupported()) {
logger.error("SystemTray IS supported");
} else {
logger.error("SystemTray IS NOT supported");
}
Run Code Online (Sandbox Code Playgroud)
为什么Windows 10不支持SystemTray?
我应该怎么做才能使其得到支持?
谢谢
我想像在mariaDB数据库中插入表情符号,但是我总是遇到sql错误。
这是堆栈跟踪:
12-01-2018 16:01:44.466 [Executor - Migration - 1] WARN o.h.e.jdbc.spi.SqlExceptionHelper.logExceptions:129 - SQL Error: 1366, SQLState: 22007
12-01-2018 16:01:44.466 [Executor - Migration - 1] ERROR o.h.e.jdbc.spi.SqlExceptionHelper.logExceptions:131 - (conn:498) Incorrect string value: '\xF0\x9F\x92\xB3\xF0\x9F...' for column 'notes' at row 1
Query is: insert into customer (backend_archiving_date, backend_creation_date, backend_update_date, genius_client_id, address, birthday, city, company_name, country, email, fidelity_account_id, first_name, last_name, notes, phone, siret, zip_code, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), …Run Code Online (Sandbox Code Playgroud) 我正在为我的 spring-boot 项目使用 swagger-annotation。
我想为控制器的每个资源返回一个通用响应代码合同。
在文档中:https://github.com/swagger-api/swagger-core/wiki/annotations#apiresponses-apiresponse 他们谈论 @ApiResponses 但我无法将注释放在类级别。
这是我所做的:
@Api(value = "Title",
description = "What this controller is about"
)
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Bad stuff from the client"),
@ApiResponse(code = 404, message = "Item not found") }
)
public class FooBarController {
...
}
Run Code Online (Sandbox Code Playgroud)
但问题是400 - Bad stuff from the client和404 - Item not found永远不会显示在生成的文档中。
在 swagger 的官方文档中,我看到了这一部分:https ://swagger.io/docs/specification/describing-responses/#reuse
问题:如何使用java注释创建一种“可重用组件”?
谢谢
android ×1
java ×1
mariadb ×1
spring-boot ×1
swagger ×1
swagger-2.0 ×1
system-tray ×1
utf-8 ×1
utf8mb4 ×1