Grails:从War中获取所有文件 [英] Grails: get all files from War

查看:153
本文介绍了Grails:从War中获取所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上个月,我做了我的项目,但由于坏扇区,我的硬盘被损坏了。

我正在使用Grails 3.1.1。我尝试将我的硬盘带到恢复数据的商店。



但该商店无法恢复我的数据,因此我的项目数据已经消失。 p>

但我仍然在我的客户服务器上有War文件。



我只想知道:是否可以我的战争文件仍然在服务器上运行,但我所有的源代码都没有了。


如果您没有任何选项并需要重新编写应用程序,我会提出以下建议:
$ b
$ b

从笔记本电脑/台式机上移除您的硬盘。购买HDD内部SATA到桌面/笔记本电脑硬盘的外部USB外壳。它与电路连接器连接(有时这也可以帮助你在启动扇区错误)。
将它连接到笔记本电脑,并检查它是否显示硬盘。如果是,则检查数据不可用。如果硬盘大小正确显示但数据不可用,那么您可以使用EaseUS Data Recovery软件恢复数据。

/ p>

将您的项目战争从服务器复制到本地计算机。
安装WinRAR或任何其他解压缩软件。
选择并打开你的战争档案。





查看上面的截图,

其中资产文件夹包含js,css,图片和其他所有图片文件。
如果您在<$ c $中设置 minifyJs = true minifyCss = true c> application.yml



现在,请查看名为 WEB-INF





查看包含两个文件夹的上图:


  1. :这是包含您的控制器类文件和gsp文件。
    控制器文件是 .class 文件,其中来自控制器的每个动作将生成单独的 .class 文件。您可以使用许多在线/离线工具来反编译点类文件。
    如果 gsp ,您将获得原始文件。
  2. 你也会得到 application.yml 和其他文件。



    希望它对你有所帮助。

    >

    I am using Grails 3.1.1

    Last month, I had my project, but my hard-disk became corrupted because of a bad sector. I tried bringing my hard-disk to a "Recovery DATA"'s store.

    But that store cannot recover my data, so my project's data is gone now.

    But I still have the War file on my customer's server.

    I just want to know: Is it possible to get my project back from a War file?

    My War file is still running on the server, but all my source code is gone.

    解决方案

    If you don't have any option and need to rewrite the application again, I'll suggest some ways:

    Remove your hard-disk from laptop/desktop. purchase HDD internal sata to external USB case for desktop/laptop hard disk. which connects with connectors with circuit(Sometimes this helps you in boot-sector error also). Connect it to the laptop and check is it showing HDD. If yes check data is available not. If HDD size showing correctly but data not available then you can recover data with " EaseUS Data Recovery" software.

    If all above fails?

    Copy your project war from server to local computer. Install WinRAR or any other unzip software. Select and open your war file with it.

    See above screenshot,

    Where assets folder contains js, css, images and all your other files. which may be minified if you set minifyJs = true and minifyCss = true in your application.yml

    Now, see very important folder called WEB-INF

    See above image which contains two folders:

    1. classes : This is very important folder which contains your controllers class files and gsp files. Controller files are .class files where for each action from controller will generate separate .class file. You can de-compile dot class files using many online/offline tools. In case of gsp you will get original files.

    Also you will get application.yml and other files as it is.

    Hope it helps you.

    这篇关于Grails:从War中获取所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆