關于jHipster框架在構建中的出現的error修復

jhipster The JDL object and the database type are both mandatory.這個錯誤應該是在構建基于jHipster的spring-cloud項目中經常遇到的,因為這個在這個過程中會讀取.yo-rc文件,之后生成相關的.json文件,再之后生成相關的.java文件,層層依賴,一環扣一環。以下是出錯時的系統日志

yerlkyu@HP-Z440:/xxx/xxxx/jdls jhipster import-jdl pl.jdl
INFO! Using JHipster vers ion installed globall, INFO! Executing import-jdl pl.jdl
INFO! Options: from-cli: true INFO! The JDL is being parsed.
Error: The JDL object and the database type are both mandatory. ERROR!
Error while parsing applications and entities from the JDL Error: The JDL obiect and the database type are both mandatory.
Error: The JDL object and the database type are both mandatory. at object.parse (/usr/Lib/node modules/generator-ihipster/node modules/ihinstercore/lib/parser/entity parser. is:59:11)
at getJSONEntities (/usr/lib/node modules/ceneratorihipster/node modules/ihipster-core/1ib/idu/idl importer.is: 154:23
at importonlyEntities (/usr/lib/node modules/generator-ihipster/node modules/ihipstercore/ib/idl/idl importer.is: 102:24
at JDLImporter.import (/usr/lib/node modules/generator-ihipster/node modules/ihipster-core/lib/idl/id importer.is:67:43)
at JDLProcessor.importJDL (/usr/lib/node modules/qenenator-ihipster/cli/impont-id. is: 76:411
at JDLProcessor. importJDL (/usr/Lib/node modules/generator-ihipster/cli/import-idl.is : 292:38)
at module.exports {/usr/lib/node modules/generator-ihipster/cli/import-idl.is: 446:21)
at Command.command, allowUnknownOption.description.action. args (/usr/lih/node modules/cenerator-ihipster/cii/cli.is:72:36)
at Command.listener (/usr/lib/node modules/qeneratorihipster/node modules/commander/index, is:315:8)
at Command.emit (events.js:189:13)

修改完一份jdl文件,之后我們需要重新生成json文件,通過import-jdl這條指令讓其自動生成文件,然而一直觸發這個錯誤,大概意思是說找不到這.yo-rc文件,其依賴于.yo-rc.json這個文件的開發,由于直接進入jdl文件所在的文件夾不能搜索到根目錄中的.yo-rc.json文件,因此,在根目錄上執行導入jdl文件即可,例如

1. jhipster import-jdl ./jdl/p1.jdl
2. jhipster import-jdl ./jdl/p1.jdl --force

注意這兩條命令的區別,作為前者,僅僅只會變更修改過的信息,不過由于這個框架在運行的過程中有某些原因,有時候并不會自動生成變更文件,那么此時建議使用指令2,這個時候會強制覆蓋所有的文件,不過這個指令會帶來一個風險,即會把原來的文件覆蓋,比如會生成類似HEAD等亂碼、或者覆蓋原來修改的文件。
其依賴json文件的生成生成,json文件如圖所示,
關于jHipster框架在構建中的出現的error修復

生成的文件,比如mapper層,數據庫表結構,DTO、impl等接口的生成都是依賴于這個jdl的生成,這個框架的集成會自動覆蓋之前生成的文件,如果你已經做了修改的話,建議通過查詢修改歷史 記錄,恢復原來修改的數據,這個是這套框架的一個bug,開著團隊聲明說他們已經修復了這個錯誤,但看起來并不是很好的能夠修復他,因此,我們需要進行手動修復。修復過程如圖所示
關于jHipster框架在構建中的出現的error修復

至于說jHipster這個框架所生成的mapper文件則是通過運行gradle 服務,使其自動生成*mapper這個映射層文件。

參考資料
jhipster官方網站:https://www.jhipster.tech/

轉載于:https://blog.51cto.com/yerikyu/2357334

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/280010.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/280010.shtml
英文地址,請注明出處:http://en.pswp.cn/news/280010.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

protobuf編碼

proto2Protocol Buffers 是一種輕便高效的結構化數據存儲格式,可以用于結構化數據序列化,適合做數據存儲或 RPC 數據交換格式。可用于通訊協議、數據存儲等領域的語言無關、平臺無關、可擴展的序列化結構數據格式。 字段規則 required: 字段必須存在opti…

定制.NET 6.0的Middleware中間件

大家好,我是張飛洪,感謝您的閱讀,我會不定期和你分享學習心得,希望我的文章能成為你成長路上的墊腳石,讓我們一起精進。在本文中,我們將學習中間件,以及如何使用它進一步定制應用程序。我們將快…

Python-循環控制--個人課堂筆記

Python中的兩種循環方式(目前學到):for循環和while循環 for循環和while循環的區別: for循環一般用于控制循環的次數,while循環則是條件循環。 操作實例-猜數字小游戲(3次猜錯提示游戲結束)&…

刪除microsoft_如何從您的Microsoft帳戶中刪除設備

刪除microsoftWhen you sign into Windows 8 or 10 using your Microsoft account (and other Microsoft devices, like an Xbox), those devices become associated with your account. If you want to remove an old device you’ve gotten rid of, you’ll have to pay a vi…

線程的語法 (event,重要)

Python threading模塊 2種調用方式 直接調用 12345678910111213141516171819import threadingimport timedef sayhi(num): #定義每個線程要運行的函數print("running on number:%s" %num)time.sleep(3)if __name__ __main__:t1 threading.Thread(targetsayhi,args(…

求最大值和下標值

本題要求編寫程序&#xff0c;找出給定的n個數中的最大值及其對應的最小下標&#xff08;下標從0開始&#xff09;。 輸入格式: 輸入在第一行中給出一個正整數n&#xff08;1<n≤10&#xff09;。第二行輸入n個整數&#xff0c;用空格分開。 輸出格式: 在一行中輸出最大值及…

windows應用商店修復_如何修復Windows應用商店中的卡死下載

windows應用商店修復Though it’s had its share of flaky behavior since being introduced in Windows 8, the Windows Store has gotten more reliable over time. It still has the occasional problems, though. One of the more irritating issues is when an app update…

OpenWrt:Linux下生成banner

Linux下有三個小工具可以生成banner&#xff1a;1、banner使用#生成banner&#xff1b;2、figlet使用一些普通字符生成banner&#xff1b;3、toilet使用一些復雜的彩色特殊字符生成banner。使用apt-get安裝的時候需要輸入以下命令&#xff1a; $ sudo apt-get install sysvbann…

新冠病毒中招 | 第二天

今天跟大家分享我個人感染奧密克戎毒株第二天的經歷和感受。早上7點多自然醒來&#xff0c;已經沒有四肢乏力的感覺&#xff0c;但是身體的本能還是告訴我不愿意動彈。由于第一天躺著睡了一天&#xff0c;確實是躺得腰酸背疼的。起床量了一下體溫36.4正常&#xff0c;決定今天不…

輸出到Excel

HSSFWorkbook oBook new HSSFWorkbook(); NPOI.SS.UserModel.ISheet oSheet oBook.CreateSheet(); #region 輸出到Excel MemoryStream ms new MemoryStream(); oBook.Write(ms);string sExportPath ""; using (SaveFileDialog saveFileDialog1 new SaveFileDial…

JavaScript 精粹 基礎 進階(5)數組

轉載請注明出處 原文連接 blog.huanghanlian.com/article/5b6… 數組是值的有序集合。每個值叫做元素&#xff0c;每個元素在數組中都有數字位置編號&#xff0c;也就是索引。JS中的數組是弱類型的&#xff0c;數組中可以含有不同類型的元素。數組元素甚至可以是對象或其它數組…

icloud 購買存儲空間_如何釋放iCloud存儲空間

icloud 購買存儲空間Apple offers 5 GB of free iCloud space to everyone, but you’ll run up against that storage limit sooner than you’d think. Device backups, photos, documents, iCloud email, and other bits of data all share that space. Apple為每個人提供5 …

基于LAMP實現web日志管理查看

前言&#xff1a;日志是一個重要的信息庫&#xff0c;如何高效便捷的查看系統中的日志信息&#xff0c;是系統管理員管理系統的必備的技術。實現方式&#xff1a;1、將日志存儲于數據庫。2、采用LAMP架構&#xff0c;搭建PHP應用&#xff0c;通過web服務訪問數據庫&#xff0c;…

WPF效果第二百零七篇之EditableSlider

前面簡單玩耍一下快速黑白灰效果; 今天又玩了一下ZoomBlurEffect,來看看最終實現的效果:1、ps和cs文件都在Shazzam中,咱們自己隨意玩耍;今天主角是下面這位:2、來看看自定義控件布局(TextBox、Slider、ToggleButton)&#xff1a;3、點擊編輯按鈕,我就直接偷懶了:private void E…

閑話高并發的那些神話,看京東架構師如何把它拉下神壇

轉載:閑話高并發的那些神話&#xff0c;看京東架構師如何把它拉下神壇 高并發也算是這幾年的熱門詞匯了&#xff0c;尤其在互聯網圈&#xff0c;開口不聊個高并發問題&#xff0c;都不好意思出門。高并發有那么邪乎嗎&#xff1f;動不動就千萬并發、億級流量&#xff0c;聽上去…

c# Clone方法

clone是深拷貝&#xff0c;copy是淺拷貝&#xff0c;如果是值類型的話是沒什么區別的&#xff0c;如果是引用類型的話深拷貝拷貝的事整個對象的數據&#xff0c;而淺拷貝僅僅拷貝對象的引用。因為類的實例是引用類型&#xff0c;要想用原有的類中的實例的數據的話&#xff0c;既…

使用MyQ打開車庫門時如何接收警報

Chamberlain’s MyQ technology is great for opening and closing your garage door remotely with your smartphone, but you can also receive alerts whenever your garage door opens and closes (as well as receive alerts when it’s been open for an extended amount…

踏實工作,實現價值

工作&#xff0c;為實現自我價值 若想在漫長的職場生涯中穩步高升&#xff0c;首先要踏踏實實&#xff0c;專心致志、充滿激情的去完成工作中的每一項任務&#xff0c;無論工作是繁重的還是瑣碎的&#xff0c;都要嚴格要求自己全身心的去完成。而不是一味的抱怨&#xff0c;一味…

mac 防火墻禁止程序聯網_如何允許應用程序通過Mac的防火墻進行通信

mac 防火墻禁止程序聯網If you use a Mac, chances are you might not even realize that OS X comes with a firewall. This firewall helps ensure unauthorized app and services can’t contact your computer, and prevents intruders from sniffing out your Mac on a ne…

WPF-22 基于MVVM員工管理-02

我們接著上一節&#xff0c;這節我們實現crud操作&#xff0c;我們在EmployeeViewMode類中新增如下成員&#xff0c;并在構造函數中初始化該成員code snippetpublic EmployeeViewMode() {employeeService new EmployeeService();BindData();Employee new Employee();AddComma…