测试当我运行 grails test-app MessageServiceSpec
或 Grails的测试应用mypackage.MessageServiceSpec 我总是得到一个错误 No tests found for given includes: [MessageServiceSpec]
这里有什么问题? UPDATE:运行命令 grails test-app -unit pac
我试图将Grails内部的taglib从服务3个呼叫标签库,但我收到此错误: No signature of method: MyService.message() is applicable for argument types: (java.util.LinkedHashMap) values: [[code:default.app.name]]
这是我使用的代码: class MySer
在Grails的服务我试图获得请求,但我发现下面的错误请求: No such property: theRequest for class: com.sherif.utils.MyService
,这里是我的服务代码: def theRequest = WebUtils.retrieveGrailsWebRequest().getCurrentRequest()
什么都没有? 感谢
在Grails中,服务默认为单例。我能保持这种状态,并仍然从控制器创建该服务的内部类的实例吗? //by default grails makes MyTestService a singlton
class MyTestService{
public class InnerTest{
String msg;
def addMsg(String str){
我有像列的表: ID,外部ID,名字,姓氏,电子邮件 我的域名: class Employee {
int id
String externalId
static mapping = {
table "Employee"
id column: "Id"
externalId column: "externalId"
version false