cost 250 ms
GroovyShell 腳本需要調用本地方法

[英]GroovyShell script needs to call local methods

我需要從字符串創建腳本並在當前測試 class 的上下文中執行它。這是我的簡化代碼: 這給了我以下錯誤: 我看到要設置變量可以使用shell.setProperty但如何將方法的實現傳遞給腳本? ...

Grails 入門:Hello World 示例獲取錯誤 500

[英]Grails Getting Started: Hello World Example Getting Error 500

剛開始學習Grails,對Groovy有一些了解,但主要是Java開發者。 https://docs.grails.org/5.2.5/guide/single.html#aHelloWorldExample在遵循本指南時,我創建了 Hello World 示例項目。 創建hello contr ...

Grails 4.1.1 Data Service無法注入Command Object: NoSuchBeanDefinitionException

[英]Grails 4.1.1 Data Service cannot be injected into Command Object: NoSuchBeanDefinitionException

我有一個簡單的控制器/命令/數據服務設計: 這是 UrlMappings 文件(以防萬一有命名空間控制器的鏈接): 此代碼的大部分基於 grails 在我的域 class 上使用 generate-all 時生成的代碼。顯然,添加的皺紋是命令(和 Try monad,但這應該是無關緊要的)。 當我 ...

從部署的應用程序(Hetzner)向 authorize.net 發送請求時連接超時?

[英]getting connect timeout when sending request to authorize.net from deployed app(Hetzner)?

我們有一個 grails 4.0.10 應用程序。 我們集成了 authorize.net 以接受信用卡付款。 我用過 accept.js 庫。 向 authorize.net 發送信用卡收費請求的代碼部分如下 當應用程序在本地運行時,它可以連接到 authorize.net 服務器。 但是當應用 ...

使用每個 {it} 遍歷 groovy 對象(列表)並將元素傳遞到 Jenkins 中的 json 有效載荷

[英]Looping through groovy object(List) using each{it} and pass the the elements into a json payload in Jenkins

我在 groovy Jenkinsfile 中有一個包含工作區名稱的列表。 我編寫了一個 each() 循環來遍歷列表,並使用下面端點中的名稱從 api 響應中獲取工作區 ID。 獲取 ID 后,我想將它們作為 json 負載的一部分進行傳遞。 有沒有一種方法可以遍歷返回的 ID 列表和 appen ...

本地工作 build.gradle 在 gitlab-ci runner 中失敗

[英]Locally working build.gradle is failing in gitlab-ci runner

在本地我運行一個 docker 容器基於圖像adoptopenjdk:11-jdk 在我的容器中,我運行./scripts/bash/run_plugin_tests.sh其中只包含gradlew check 構建成功並執行測試在我們的 Gitlab 服務器上我正在運行一個 gitlab ci ru ...

默認 cursor 位置是什么?

[英]What is the default cursor location?

我的藏書越來越多了。 例如,當我得到像def bookList = Book.findAllBy...()這樣的列表時,GORM 返回的是客戶端 cursor 還是服務器端 cursor? 我正在使用 MariaDB。 ...

2023-01-25 09:15:45   1   16    grails  
從 gradle 5.2 升級 -> 6.0 出現錯誤:找不到或加載主 class

[英]Upgrading from gradle 5.2 -> 6.0 gives error: could not find or load main class

賞金將在 5 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Zorobay想提請更多人關注這個問題: 我只想弄清楚為什么會出現此錯誤以及如何修復它。 截至目前,我無法使用 Gradle 6:( 我正在按照官方指南將 gradle 的 Grails 應用程序從 5.2 版升級到 6.0 版: ...

CreateProcess error=206,使用springsecurity時文件名或擴展名太長

[英]CreateProcess error=206, The filename or extension is too long while using springsecurity

我正在使用 jdk v.1.8、grails v.3.3.10。 我正在嘗試將我的應用程序的一些端點實現為 rest,並保持正常 web 頁 url。因此,為了實現這一點,在 build.gradle 文件中添加了以下行 在我嘗試運行 grails 應用程序后,我遇到了異常 Caused by: j ...

在 Visual Studio Code for MacOS 上設置 Grails / Groovy Server Pages 項目

[英]Setting up a Grails / Groovy Server Pages project on Visual Studio Code for MacOS

我需要為客戶對現有項目進行一些 HTML/CSS 更改。 我已經在我的機器上克隆了存儲庫,但我不太確定如何設置它以在本地查看更改。 我看到很多帶有 .gsp 擴展名的文件,經過一些谷歌搜索后,我發現這些文件意味着這是一個 Grails/Groovy Server Pages 項目,我對它的經驗為零( ...

存儲在 mysql 5.7 和 mysql 8 中的日期時間與 grails 的差異?

[英]difference in datetime stored in mysql 5.7 and mysql 8 by grails?

我會盡力使我面臨的問題盡可能清楚。 我有一個帶有 datecreated 字段的注冊域。 我有一個舊的 grails 2.2 應用程序,它使用 mysql 5.7。 該應用程序以美國/山區時區運行。 當我在 grails 2.2 和 mysql 5.7 中創建注冊時,日期將存儲為美國/山地時間,如 ...

try/catch with @Transactional 拋出 TransactionException 而不是 catch 的異常

[英]try/catch with @Transactional throws TransactionException instead of catch's exception

我有一個問題,我的 controller 被標記為@Transactional並且我有一個方法,它有try/catch塊應該捕獲DataIntegrityViolationException ,一切都很好, catch被執行,但最后我沒有看到來自catch的消息,但我可以看到: 添加@Transac ...

使用 grails-asset-pipeline 從源代碼編譯 bootstrap 5

[英]Use grails-asset-pipeline to compile bootstrap 5 from source

我正在嘗試弄清楚如何從源代碼編譯最新的引導程序 (v5.0.2),這樣我就可以更輕松地使用 SASS 變量為 grail (v5.2.3) 應用程序使用 grails 資產管道自定義主題。 通過對 build.gradle 進行這些更改,我已經能夠通過資產管道編譯和加載 .scss: 我下載了 b ...

如何在grails中實現並發session過濾器來處理session的多登錄?

[英]How to implement concurrent session filter in grails to handle multiple login session?

例如:假設用戶“testuser@xyz.com”從一個瀏覽器登錄並執行一些工作。 同時在這種情況下,其他人使用同一用戶“testuser@xyz.com”從另一個瀏覽器/機器登錄,我想實現以下方式如果第一個登錄用戶在過去 3-4 分鍾內未執行任何操作(非活動狀態),則第一個用戶將注銷,第二個用戶 ...

在 Spock 測試中調用 entity.delete(flush: true) 不會刷新,也不會使用 withTransaction,必須分別運行

[英]Calling entity.delete(flush: true) in a Spock test does not flush, nor does using withTransaction, one has to run both separately

我有一個帶有 Spock 2.0 測試的 Grails 5.2.5 應用程序。 在其中,我嘗試刪除這樣的實體: 它失敗。 保存的實體在刪除嘗試后保留在那里。 如果我將entity.delete()替換為以下三個選項中的任何一個,它仍然會失敗。 或者,如果我刪除failOnError:true 。 我 ...

2022-12-15 14:06:46   1   28    grails / spock  
grails4 遷移 Traits 延遲加載問題 - HHH000142:字節碼增強失敗

[英]grails4 migration Traits lazy load issue - HHH000142: Bytecode enhancement failed

我已將我的應用程序從 Grails-3.x 遷移到 Grails-4.1.1 我的大多數域類都實現了以下特征 class (DynamicProperties),出於某種原因它具有 GormEntity 的實現 - 以覆蓋 propertyMissing 方法。 上面的特征已經被許多像這樣的領域類實 ...

Grails 5.x 中的熱重載類

[英]Hot reload classes in Grails 5.x

我在 Grails 3.x 上使用 IntelliJ 已經很長時間了。 項目中經常用到spring security等不錯的插件。 一個不錯的功能是,如果我更改 java/groovy class,那么我會在運行時看到 ide 編譯和部署,而無需重新啟動整個項目。 移動到 Grails 5.x 我看 ...

有沒有辦法在 Grails 40.12 中配置 Spring Security Core 插件,例如用戶可以使用經過哈希處理的 SHA256 密碼登錄

[英]Is there a way to configure Spring Security Core Plugin in Grails 40.12 such as that users can login with their passwords that were hashed SHA256

我最近開始嘗試將此應用程序從 Grails 2.5.6 更新到 Grails 4.0.12。 一般來說,我對 grails 和編程還很陌生,所以已經 3 周了,數百次嘗試都沒有成功。 除了密碼散列之外,一切似乎都工作正常。 由於密碼是使用 SHA256 散列的,因此用戶無法登錄。 我已經嘗試了來自互 ...

連接到 mysql 8 數據庫時切換用戶不起作用?

[英]switch user not working when connected to mysql 8 database?

我正在嘗試使 spring 安全性中的切換用戶功能正常工作。 我正在使用 grails 4.0.10 和 mysql 8。 我創建了一個示例 hello world grails 應用程序,並按照文檔中的切換用戶指南進行操作。 https://grails.github.io/grails-sp ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM