打包命令: play war
play war e:/codes/cn.ngmc.frontend -o f:/backup_ngmc/20160614frontend_001Dev; 即:play war 被打包的项目路径 -o 编译后的文件路径
1.打印执行的sql语句
在application.conf里面添加:
hibernate.use_sql_comments=true
hibernate.use_sql_comments=true
db.default.logStatements=true
logger.org.hibernate=DEBUG
2.获取url信息
Request.current.get(). headers
获取请求的参数:request .params
3.jdk不同版本引发的验证错误:
![](https://images2017.cnblogs.com/blog/803386/201709/803386-20170920085327696-1126319612.png)
报的错所指的方法其实并没有问题 ,有的jdk不会发生这么的情况,是某一些jdk1.7版本的问题
产生Error的原因
经过查询是因为 Any tool that modifies bytecode in a version 51 classfile must be sure to update the stackmap information to be consistent with the bytecode in order to pass verification. JDK7 引入版本为51的字节码规范,使用了严格的类型检查器,任何工具修改了字节码的,都需要更新stackmap,但是jws修改了字节码,而没有更新 stackmap。
解决方案
解决方法:启动参数添加 -XX:-UseSplitVerifier
![](https://images2017.cnblogs.com/blog/803386/201709/803386-20170920085418728-2122143759.png)
链接: 1. http://blog.csdn.net/lili625/article/details/49427635 2.http://stackoverflow.com/questions/6704169/verifyerror-expecting-a-stack-map-frame-in-method-controllers-securesecurity-a
4.后台传递"URL"到页面引起的问题:
后台java代码传递字符串形式的url路径不要采用"URL"名字,play会默认为java类下的Class java.net.URL
遇到的情况如下:
1.在java后台代码已名字"URL"传递
![](https://images2017.cnblogs.com/blog/803386/201709/803386-20170920085519275-1971008031.png)
![](file:///C:/Users/chenyong/AppData/Local/Temp/enhtmlclip/1.png)
2.页面引用"URL"值并提交
![](https://images2017.cnblogs.com/blog/803386/201709/803386-20170920085525712-2022002176.png)
![](file:///C:/Users/chenyong/AppData/Local/Temp/enhtmlclip/2.png)
3.请求的路径被解析为该情况:
![](https://images2017.cnblogs.com/blog/803386/201709/803386-20170920085444603-1508118249.png)
解决办法:不要用"URL"名字传递,改为其他任意名字就好.