libraries - ReSTLet 框架 - 编辑 agent.properties 文件

标签 libraries restlet java restlet-2.0

我正在使用ClientInfo class从 RESTlet 从客户端使用的浏览器获取用户代理。

它工作正常,但有点过时(新的 Opera 被检测为 Chrome,等等...),所以我想手动将模板插入到 agent.properties 文件中。问题是我不知道 agent.properties 文件在哪里。我只有 RESTlet 的 jar 文件。

上面的链接显示:

Restlet users has the ability to define their own way to extract data from the "user-agent" header. It is based on a list of templates declared in a file called "agent.properties" and located in the classpath in the sub directory "org/restlet/data".

有人知道 agent.properties 文件在哪里吗?

最佳答案

它位于 2.2 版本的核心 ReSTLet 库 jar (org.reSTLet) 中,与 ClientInfo 类位于同一包中。我还没有检查过 2.0,但我怀疑它仍然存在。

主副本的 github 位置当前位于 https://github.com/restlet/restlet-framework-java/blob/master/modules/org.restlet/src/org/restlet/data/agent.properties我确信处理升级的浏览器版本的补丁会受到欢迎。

关于libraries - ReSTLet 框架 - 编辑 agent.properties 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23537978/

相关文章:

java - 从 HTML 表中进行多重搜索

C,使用 sqrt 和 math.h 时出现编译问题

tomcat - Tomcat 中使用 ReSTLet 的路径目录

c++ - 带有 C++ 组的 VS 2012 include/lib

java - 无法初始化 GsonConverter

java - reSTLet 引擎中带有长字符串的 Pattern.match 的 StackoverflowError

java - 在后台服务中每 n 分钟运行一次任务

java - 需要帮助解决 Java 中的 ArrayIndexOutOfBounds 异常

c - C 的公共(public)库是什么?

javascript - 在 Extendscript (Javascript) 中使用日期库