play2 框架 IO error while decoding Routes.scala with UTF-8
来源:互联网 发布:码字软件故事树 编辑:程序博客网 时间:2024/05/24 05:13
今天初次接触play2 框架 ,入门程序碰到了一个小问题,run之后编译时会报如下错误
IO error while decoding Routes.scala with UTF-8,Please try specifying another one using the -encoding option"
百度之后有人建议设置环境变量
JAVA_TOOL_OPTIONS='-Dfile.encoding=UTF8'
我更改后在shell下还是报错,于是改用IDEA导入项目,结果还是报错。
后来设置了项目中所有文件都用UTF-8编码,项目成功编译,并显示了正确的结果。
下面是play框架的流程。
Play Web应用的调用顺序和关系为:
浏览器 ( http://localhost:9000/ )-> Play 框架 (conf/routes) -> 对应的Controller代码 (app/controllers/Application.scala) -> 对应的返回Action (def index = Action {...}) 的方法 -> 对应的可返回Result的代码 (OK(...)) -> 要返回的正文内容 ( "..." 纯文本 或 Html("...) HTML格式) 。
阅读全文
0 0
- play2 框架 IO error while decoding Routes.scala with UTF-8
- Error:scalac: IO error while decoding PackageOps.scala with UTF-8 Please try specifying another one
- [ERROR] IO error while decoding 路径 routes_reverseRouting.scala with UTF-8 问题解决
- decoding tomcat's URI with UTF-8
- play2 split routes到多个文件
- scala语言使用play2框架连接mysql数据库
- scala + play2+mysql
- Play2.5 scala 学习记录
- Error while performing database login with the XXX driver:Io 异常: The Network Adapter could not estab
- PLAY2.0框架快速入门
- Play2 自定义模板类型 (Java&Scala)
- Scala Play2 Samples by Scott Huang
- 启动scala时出现“error while loading AnnotatedElement”
- Android Hardware Decoding with MediaCodec
- FATAL conf.Configuration: error parsing conf file:com.sum.*.io.MalformedByteSequenceExcetion:*UTF-8
- Error :Could not decode ...With "UTF-8"-encoding. Editing not possible
- uploadify with IO error under_firefox by https
- UTF-8 with BOM是什么意思
- python爬虫慕课网实例(一)
- PreparedStatement 批量更新,插入数据到Oracle mysql
- FAT16文件系统之目录项分析(四)
- Stream 求和
- 什么是钩子函数?
- play2 框架 IO error while decoding Routes.scala with UTF-8
- PHP之图片上传到服务器、上传的错误类型
- 问题:合并两个有序链表,合并以后的链表依旧有序。
- 在线识图搜索引擎
- 特征提取--基于局部二值模型(LBP)的特征提取
- java类加载的过程
- 学习笔记之JavaScript——知识点(2)
- J
- Java学习笔记(一)----封装 继承 多态 抽象 接口