在 IntelliJ 中运行 webapp 基础 Flex 客户端
是否可以在 IntelliJ 内部运行 Flex 客户端并让它与单独部署的服务器实例通信?服务器是一个java webapp。这将使开发,尤其是调试变得更加容易。我试图避免的是必须重建并重新部署 Web 应用程序才能在其中获取更新的 Flex 代码。我只想构建 flex 并在服务器上运行它。
Flex 客户端嵌入在服务器上的 HTML 页面中,因此在生产中用户通过访问网页来访问客户端。如果这很重要的话,我们会使用 GraniteDS。
更新
我设法拼凑了一些东西,但它很丑陋。
- 我制作了包装器 HTML 页面的副本,并修复了引用目标中 SWF 的链接
- 我将 IntelliJ 运行配置设置为指向该 HTML 页面
- 我将“将 SWF 文件放入本地受信任的沙箱”设置为 true
- 对
{server.name}
、{server.port}
和 < code>{context.root}service-config.xml
GraniteDS 配置文件中的值到本地主机等。
我可以 mavenize #1,但 #3 并不是真正的永久解决方案。这部分仍然是一个问题,因为我无法签入。有任何改进或替代解决方案吗?
Is it possible to run a Flex client in IntelliJ internally and have it talk to a separately deployed server instance? The server's a java webapp. This will make developing, especially debugging, much easier. What I'm trying to avoid is having to rebuild and redeploy the webapp to get the updated Flex code in it. I want to just build flex and run it against the server.
The flex client is embedded in an HTML page on the server, so in production the users access the client by going to a web page. We're using GraniteDS if that's important.
Update
I'm managed to cobble something together, but it's ugly.
- I made a copy of our wrapper HTML page and fixed the links to refer to the SWF in target
- I setup the IntelliJ run config to point to that HTML page
- I set the 'Place SWF file in a local-trusted sandbox' to true
- Hardcoded the
{server.name}
,{server.port}
, and{context.root}
values in theservice-config.xml
GraniteDS config file to localhost, etc.
I can mavenize #1, but #3's isn't really a permanent solution. That part is still a problem because I can't check this in. Any improvements or alternative solutions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
大多数 Flex 应用程序并不真正使用 services-config.xml 进行客户端通道配置,因为这会将 url 硬编码到 SWF 中。更好的解决方案是将配置外部化。大多数 Flex 框架(Swiz、Robotlegs 等)都提供了一种将通道配置外部化到 XML 文件的好方法。不过,您也可以推出您自己的基于 XML 的客户端通道配置。
Most Flex apps don't really use the services-config.xml for client channel configuration because this hard codes the urls into the SWF. A better solution is to externalize the configuration. Most of the Flex frameworks (Swiz, Robotlegs, etc) provide a nice way to externalize the channel config to an XML file. However you can also roll your own XML-based client channel configuration.