Intellij 告诉我这updateTime是不正确的参数类型。我不熟悉这个错误和@EnumDateFormat.
@DELETE
@Path("groups/{groupId}/samples/{testYear}")
@Produces(MediaType.APPLICATION_JSON)
@RolesAllowed({Profile.MP_USER_ROLE})
public Response deleteGroupSamples (@PathParam("groupId") Long groupId, @PathParam("testYear") Long testYear, @QueryParam("updateTime") @EnumDateFormat( FormatEnum.WITH_HHMMSS ) DateTime updateTime, TreatmentGroupTest sample) throws ValidationException{
manager.deleteGroupSample( this.getUser(), sample.getTestSampleId(), updateTime );
ResponseBuilder builder=null;
builder = Response.ok( );
return builder.build();
}
Run Code Online (Sandbox Code Playgroud)
该错误还表明:
检查参数@PathParam、@QueryParam 等的类型。带注释的参数、字段或属性的类型必须是
是原始类型
有一个接受单个字符串参数的构造函数
有一个名为 valueOf 或 formString 的静态方法,它接受单个 String 参数(例如,参见 Integer.valueOf(String))
拥有 ParamConverterProvider JAX-RS 扩展 SPI 的注册实现,该实现返回能够进行该类型“表单字符串”转换的 ParamConverter 实例
是 List、Set 或 SortedSet,其中 T 满足上述 2、3 或 4。结果集合是只读的
得到这些错误:
2018-01-22 18:00:59,797 [ServerService Thread Pool -- 79] ERROR org.quartz.ee.servlet.QuartzInitializerListener - Quartz Scheduler failed to initialize: org.quartz.SchedulerException: SchedulerPlugin class 'org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin' could not be instantiated. [See nested exception: java.lang.ClassNotFoundException: Unable to load class org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin by any known loaders.]
2018-01-22 18:00:59,797 [ServerService Thread Pool -- 79] ERROR stderr - org.quartz.SchedulerException: SchedulerPlugin class 'org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin' could not be instantiated. [See nested exception: java.lang.ClassNotFoundException: Unable to load class org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin by any known loaders.]
2018-01-22 18:00:59,805 [ServerService Thread Pool -- 79] ERROR stderr - Caused by: …Run Code Online (Sandbox Code Playgroud) 我有一个向我的后端发出 http 调用的服务:
exportSubs(param: Param): Observable<Sub[]> {
return this.http.get<Sub[]>(
`${environment.apiBaseUrl}/blah`,
{headers: this.httpUtil.getReqHeaders})
.catch(error => this.httpUtil.handleError(error));
}
Run Code Online (Sandbox Code Playgroud)
我在哪里设置 responseType?
CellStyle stringStyle = workbook.createCellStyle();
stringStyle.setAlignment(HorizontalAlignment.CENTER);
Run Code Online (Sandbox Code Playgroud)
this code produces error:
method setAlignment in interface CellStyle cannot be applied to given types;
required: short
found: HorizontalAlignment
reason: actual argument HorizontalAlignment cannot be converted to short by method invocation conversion
so I change the code to use a short:
CellStyle stringStyle = workbook.createCellStyle();
stringStyle.setAlignment((short)1);
Run Code Online (Sandbox Code Playgroud)
And my IDE complains saying:
setAlignment (org.apache.poi.ss.usermodel.HorizontalAlignment) in CellStyle cannot be applied to (short)
So it complains that it wants a short when I give it a HorizontalAlignment and …