我正在 context.xml 中的项目(菜单提供程序服务)中集成外部项目合同服务客户端。我正在使用 Spring Boot 在 STS 中运行我的项目,在启动 Spring Boot 应用程序时遇到以下错误。
java.lang.IllegalArgumentException: No ConfigurationProperties annotation found on 'com.cnanational.contract.client.config.ContractClientConfig'.
at org.springframework.util.Assert.notNull(Assert.java:134)
2018-02-22 10:59:52.867 INFO 10184 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@79501dc7: startup date [Thu Feb 22 10:59:51 GMT-07:00 2018]; root of context hierarchy
2018-02-22 10:59:52.869 WARN 10184 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@79501dc7: startup date [Thu Feb 22 …
Run Code Online (Sandbox Code Playgroud) 我在typescript组件中创建一个列表项,它将显示在UI中.列表项应以单独的行显示.所以我添加了新的字符串\n如下所示.但是列表项仍然显示在同一行中.下面是代码.知道为什么它不起作用吗?
打字稿代码:
@Output() excludeDisplay: any = '';
@Output() includeDisplay: any = '';
includeValues: any = '';
excludeValues: any = '';
this.includeValues += this.merId + ',' + this.explodeStatus + '\n';
console.log("include values are "+ this.includeValues);
this.excludeValues += this.merId + ',' + this.explodeStatus + '\n';
console.log("exclude values are "+ this.excludeValues);
this.includeDisplay = this.includeValues;
this.excludeDisplay = this.excludeValues;
Run Code Online (Sandbox Code Playgroud)
Html代码:
<ul id="excludedUl" required>{{ excludeDisplay }}</ul>
<ul id="includedUl" required>{{ includeDisplay }}</ul>
Run Code Online (Sandbox Code Playgroud)
CSS代码:
#includedUl {
float: right;
width: 33%;
}
#excludedUl {
float: right;
width: 33%;
}
Run Code Online (Sandbox Code Playgroud) Given below is my main controller from which i am calling getPDFDetails method.
@RequestMapping(value=PATH_PRINT_CONTRACTS, method=RequestMethod.POST)
public ResponseEntity<?> printContracts(@RequestBody final UpdatePrintContracts updatePrintContracts) throws Exception {
System.out.println("contracts value is "+ updatePrintContracts);
Integer cancellationReasons = service.getPDFDetails(updatePrintContracts);
System.out.println("success!");
return ResponseEntity.ok(cancellationReasons);
}
Run Code Online (Sandbox Code Playgroud)
Below is the UpdatePrintContracts class where i have defined all the variables with validation annotations and corresponding getter/setter methods.
public class UpdatePrintContracts {
@Valid
@NotBlank
@Pattern(regexp = "\\p{Alnum}{1,30}")
String isReprint;
@Valid
@NotBlank
Integer dealerId;
@Valid
@NotBlank
@Pattern(regexp = "\\p{Alnum}{1,30}")
String includeSignatureCoordinates;
@Valid
@NotBlank …
Run Code Online (Sandbox Code Playgroud) 这是我正在检查页面是否空闲的html代码。如果闲置了一段时间,我需要抛出不活动警报并注销用户。
<div *ngIf="environmentData" xmlns="http://java.sun.com/jsf/html" (load)="startTimers()" (mousemove)="resetTimers()" (keypress)="resetTimers()">
Run Code Online (Sandbox Code Playgroud)
这些函数在打字稿组件中定义,如下所示:timoutNow变量设置为10分钟。但是,每当鼠标移动或按下某个键时,屏幕就会弹出警报。为什么在显示警报之前不等待我设置的那个时间?
// Start timers.
startTimers() {
console.log("inside start timers method");
console.log("time out number is "+this.timoutNow);
this.timeoutTimer = setTimeout(this.showTimeout(), this.timoutNow);
// window.location.href = this.environmentData.logoutUrl;
}
showTimeout(){
console.log("inside show timeout");
bootbox.alert("You are being timed out due to inactivity!");
}
// Reset timers.
resetTimers() {
console.log("inside reset timers method");
clearTimeout(this.timeoutTimer);
this.startTimers();
}
Run Code Online (Sandbox Code Playgroud) java ×2
spring-boot ×2
typescript ×2
angular ×1
css ×1
html ×1
html5 ×1
settimeout ×1
soapui ×1
spring ×1
validation ×1