当我从JSP FORM发送请求时,服务器端会自动将数据解析到我的ModelObject.但是当我从Backbone save()发送请求时,我的ModelObject在服务器端是空的.我怎么能像JSP FORMs那样做?
@RequestMapping(value = "/member/ajax*", method = RequestMethod.POST)
public void onSubmitAjax(Member member, HttpServletResponse response, HttpServletRequest request) throws Exception {
//member is empty
memberManager.saveMember(member);
}
Run Code Online (Sandbox Code Playgroud)
当我使用GET时,它正在客户端工作:
@RequestMapping(value = "/member/ajax*", method = RequestMethod.GET)
public
@ResponseBody
Member showForm(@RequestParam(required = false) Long id, HttpServletRequest request) throws Exception {
Member member = memberManager.getMember(id);
return member;
}
Run Code Online (Sandbox Code Playgroud) "无法验证新建立的连接"错误发生.
我用Google搜索并阅读与此错误相关的每个问题.但是没能找到解决方案.
我正在使用spring-boot-starter-data-jpa.
它与Postgresql没有任何错误.但我想使用嵌入式数据库!
application.properties:
#We don't need JMX here - disabling it allows for faster startup
spring.jmx.enabled=false
spring.datasource.testOnBorrow=true
spring.datasource.validationQuery=SELECT 1
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=create-drop
spring.datasource.driver-class-name=org.hsqldb.jdbcDriver
spring.jpa.database-platform=org.hibernate.dialect.HSQLDialect
spring.datasource.url=jdbc:hsqldb:file:${user.home}/db/data;user=sa;password=123;
spring.datasource.username=sa
spring.datasource.password=123
Run Code Online (Sandbox Code Playgroud)
MainApplication类的标题:
@ComponentScan(value = {"db", "app", "ui"})
@EnableJpaRepositories(basePackages = "db")
@EntityScan(basePackages = "db")
@EnableTransactionManagement
@SpringBootApplication
Run Code Online (Sandbox Code Playgroud)
仅当我使用嵌入式数据库(至少是Derby,HSQLDB)时才抛出此错误,而不是总是如此.有时它会正常启动,查找并保存实体而不会出现错误,但有时会在等待一段时间后或成功交易后立即发生.
我怎么解决这个问题?
我想重新开发新的桌面应用程序以从 EMV 智能卡读取信息,并且我有来自以前(工作)应用程序的日志。
假设在 EMV 智能卡中有一个 AID = 44 44 44 44 44 44 44 44 (DDDDDDDD) 的应用程序。
我正在发送 APDU 命令:00 A4 04 00 08 44 44 44 44 44 44 44 44 00 并获得超时异常(超时 = 60 秒)。
我尝试发送 APDU 命令:00 A4 04 00 08 44 44 44 44 44 44 44 44 并得到响应代码 = 61 37。
我尝试选择文件 1PAY.SYS.DDF01,立即得到响应 = 6a82(正确)。
spring ×2
apdu ×1
emv ×1
java ×1
model ×1
postgresql ×1
smartcard ×1
spring-boot ×1
spring-mvc ×1