`
messi_18
  • 浏览: 98580 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

an example of Hibernate in Groovy

 
阅读更多
org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from demo.Book]

	at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:80)

	at antlr.CharScanner.setTokenObjectClass(CharScanner.java:338)

	at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:54)

	at antlr.CharScanner.<init>(CharScanner.java:49)

	at antlr.CharScanner.<init>(CharScanner.java:58)

	at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)

	at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:53)

	at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:50)

	at org.hibernate.hql.ast.HqlLexer.<init>(HqlLexer.java:49)

	at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:67)

	at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:265)

	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180)

	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)

	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)

	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)

	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)

	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)

	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)

	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)

	at com.sun.proxy.$Proxy13.createQuery(Unknown Source)

	at org.hibernate.Session$createQuery.call(Unknown Source)

	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)

	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

	at demo.ConsoleScript1.run(ConsoleScript1:55)

	at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:257)

	at groovy.lang.GroovyShell.run(GroovyShell.java:481)

	at groovy.lang.GroovyShell.run(GroovyShell.java:163)

	at groovy.lang.GroovyShell$run.call(Unknown Source)

	at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:951)

	at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)

	at groovy.lang.Closure.call(Closure.java:411)

	at groovy.lang.Closure.call(Closure.java:405)

	at groovy.lang.Closure.run(Closure.java:492)

	at java.lang.Thread.run(Thread.java:722)

org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from demo.Book]

	at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:80)

	at antlr.CharScanner.setTokenObjectClass(CharScanner.java:338)

	at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:54)

	at antlr.CharScanner.<init>(CharScanner.java:49)

	at antlr.CharScanner.<init>(CharScanner.java:58)

	at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)

	at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:53)

	at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:50)

	at org.hibernate.hql.ast.HqlLexer.<init>(HqlLexer.java:49)

	at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:67)

	at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:265)

	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180)

	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)

	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)

	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)

	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)

	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)

	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)

	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)

	at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)

	at com.sun.proxy.$Proxy13.createQuery(Unknown Source)

	at org.hibernate.Session$createQuery.call(Unknown Source)

	at demo.ConsoleScript1.run(ConsoleScript1:55)


This can be fixed by adding following property to the hibernate configuration file hibernate.cfg.xml

<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>

However, this caused another problem:
WARNING: Sanitizing stacktrace:

java.lang.IllegalArgumentException: Can not set java.lang.String field demo.Book.author to demo.Book

	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164)

	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168)

	at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:55)

	at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36)

	at java.lang.reflect.Field.get(Field.java:372)

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:55)

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.getForInsert(DirectPropertyAccessor.java:63)

	at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValuesToInsert(AbstractEntityTuplizer.java:294)

	at org.hibernate.tuple.entity.PojoEntityTuplizer.getPropertyValuesToInsert(PojoEntityTuplizer.java:239)

	at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValuesToInsert(AbstractEntityPersister.java:3696)

	at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290)

	at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)

	at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)

	at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)

	at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)

	at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)

	at com.sun.proxy.$Proxy13.save(Unknown Source)

	at org.hibernate.Session$save.call(Unknown Source)

	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)

	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

	at demo.ConsoleScript5.run(ConsoleScript5:48)

	at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:257)

	at groovy.lang.GroovyShell.run(GroovyShell.java:481)

	at groovy.lang.GroovyShell.run(GroovyShell.java:163)

	at groovy.lang.GroovyShell$run.call(Unknown Source)

	at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:951)

	at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)

	at groovy.lang.Closure.call(Closure.java:411)

	at groovy.lang.Closure.call(Closure.java:405)

	at groovy.lang.Closure.run(Closure.java:492)

	at java.lang.Thread.run(Thread.java:722)
五月 12, 2013 3:55:35 下午 org.codehaus.groovy.runtime.StackTraceUtils sanitize

WARNING: Sanitizing stacktrace:

org.hibernate.PropertyAccessException: could not get a field value by reflection getter of demo.Book.author

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:58)

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.getForInsert(DirectPropertyAccessor.java:63)

	at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValuesToInsert(AbstractEntityTuplizer.java:294)

	at org.hibernate.tuple.entity.PojoEntityTuplizer.getPropertyValuesToInsert(PojoEntityTuplizer.java:239)

	at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValuesToInsert(AbstractEntityPersister.java:3696)

	at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290)

	at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)

	at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)

	at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)

	at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)

	at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)

	at com.sun.proxy.$Proxy13.save(Unknown Source)

	at org.hibernate.Session$save.call(Unknown Source)

	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)

	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

	at demo.ConsoleScript5.run(ConsoleScript5:48)

	at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:257)

	at groovy.lang.GroovyShell.run(GroovyShell.java:481)

	at groovy.lang.GroovyShell.run(GroovyShell.java:163)

	at groovy.lang.GroovyShell$run.call(Unknown Source)

	at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:951)

	at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)

	at groovy.lang.Closure.call(Closure.java:411)

	at groovy.lang.Closure.call(Closure.java:405)

	at groovy.lang.Closure.run(Closure.java:492)

	at java.lang.Thread.run(Thread.java:722)

Caused by: java.lang.IllegalArgumentException: Can not set java.lang.String field demo.Book.author to demo.Book

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:55)

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.getForInsert(DirectPropertyAccessor.java:63)

	at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValuesToInsert(AbstractEntityTuplizer.java:294)

	at org.hibernate.tuple.entity.PojoEntityTuplizer.getPropertyValuesToInsert(PojoEntityTuplizer.java:239)

	at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValuesToInsert(AbstractEntityPersister.java:3696)

	at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290)

	at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)

	at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)

	at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)

	at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)

	at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)

	at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)

	at com.sun.proxy.$Proxy13.save(Unknown Source)

	at org.hibernate.Session$save.call(Unknown Source)

	at demo.ConsoleScript5.run(ConsoleScript5:48)

org.hibernate.PropertyAccessException: could not get a field value by reflection getter of demo.Book.author

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:58)

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.getForInsert(DirectPropertyAccessor.java:63)

	at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValuesToInsert(AbstractEntityTuplizer.java:294)

	at org.hibernate.tuple.entity.PojoEntityTuplizer.getPropertyValuesToInsert(PojoEntityTuplizer.java:239)

	at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValuesToInsert(AbstractEntityPersister.java:3696)

	at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290)

	at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)

	at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)

	at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)

	at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)

	at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)

	at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)

	at org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)

	at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)

	at com.sun.proxy.$Proxy13.save(Unknown Source)

	at org.hibernate.Session$save.call(Unknown Source)

	at demo.ConsoleScript5.run(ConsoleScript5:48)

Caused by: java.lang.IllegalArgumentException: Can not set java.lang.String field demo.Book.author to demo.Book

	at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:55)

	... 19 more


Just as you may notice, I try this demo code in groovy console, after I clear script context, this issue also disappeared.
分享到:
评论

相关推荐

    Groovy in action

    The result is the true definitive guide to the new Groovy language., Groovy in Action introduces Groovy by example, presenting lots of reusable code while explaining the underlying concepts....

    groovy in action 中文版 2017.11

    Groovy是一种运行在Java虚拟机上的敏捷开发语言,它提供了与Java无缝集成的能力,同时为开发者带来更加简洁和富有表达性的语法。Groovy提供了大量的动态特性,比如动态类型、闭包、元编程能力等,使得编写脚本或应用...

    groovy+in+action

    ### Groovy in Action:深入学习Groovy编程语言 #### 一、引言 《Groovy in Action》是一本详尽介绍Groovy编程语言的书籍,由Dierk König撰写,并得到了Andrew Glover、Paul King、Guillaume Laforge以及Jon ...

    groovy in action.pdf

    《Groovy in Action》这本书由Dierk König与Andrew Glover、Paul King、Guillaume Laforge以及Jon Skeet共同编写,是一本深入探索Groovy编程语言的权威指南。本书由Manning Publications出版,全面覆盖了Groovy语言...

    Groovy IN ACTION

    《Groovy in Action》是一本深入探讨Groovy编程语言的专业书籍,主要面向已经熟悉Java的开发者,旨在帮助他们理解和掌握Groovy的特性和优势。Groovy是Java平台上的动态脚本语言,它融合了多种语言的特性,如Python、...

    ros by example to groovy

    ros by example to groovy

    ROS by example( hydro,groovy,indigo版本集合)

    【打包下载,包含4个版本:Indigo, Groovy , Hydro I, Hydro II,内容超千页】 ROS机器人操作系统,非常强大,包含很多机器人开源代码。这本书适合初学者。涉及到(1)ROS基本概念和编程技术;(2)使用ROS控制...

    Z2-Groovy in Action.pdf

    Groovy将所有类型都视为对象(Everything is an object),这意味着Groovy中的基本数据类型(如整数、浮点数和字符串)也拥有方法。Groovy利用这一特性,提供了许多方便的操作,例如字符串插值,以及利用GString实现...

    Groovy.in.Action.2nd.Edition.pdf

    本书《Groovy in Action》英文第二版为读者提供了全面的Groovy实战指南。在前言中,我们看到James Gosling,Java的创始人,对此书给予高度评价,这也反映了Groovy在动态语言特性以及在敏捷开发方面的表现。 本书...

    Groovy in Action源代码

    《Groovy in Action》是一本深受开发者喜爱的书籍,它深入浅出地介绍了Groovy编程语言,涵盖了Groovy的基础语法、高级特性以及在实际开发中的应用。源代码是书籍内容的实践部分,对于读者理解Groovy语言并进行实战...

    Groovy in Action[文字版][中文]

    《Groovy in Action》是一本深入探讨Groovy编程语言的专业书籍,中文版的出现使得国内开发者更容易理解和掌握Groovy的相关知识。Groovy是基于Java虚拟机(JVM)的一种动态、灵活的编程语言,它结合了脚本语言的便利...

    Groovy学习资料(包括Groovy in action 的中英文以及API)

    Groovy in Action是一本权威的Groovy教程,由Dierk Koenig和Andrey Breslav等专家撰写,它深入浅出地介绍了Groovy的各个方面,是学习Groovy的必备参考书。 这本书分为多个部分,首先介绍Groovy的基础知识,包括语法...

    groovy programming(2006.12).pdf

    《Groovy编程:Java开发者的入门指南》是Kenneth Barclay和John Savage为Java开发者编写的关于Groovy语言的详细介绍。此书首次出版于2006年,由Morgan Kaufmann Publishers出版,该出版社隶属于Elsevier集团。本书...

    groovy_in_action_draft_ch_01.pdf

    For example, developers can write unit tests in Groovy for Java classes or use Groovy scripts to automate deployment processes. **1.1.2 Power in Your Code: A Feature-Rich Language** Groovy is ...

    Groovy_in_Action Groovy经典入门 使用Grails快速开发Web应用

    Groovy_in_Action.pdf Groovy经典入门.pdf 使用Grails快速开发Web应用.pdf 在Eclipse里使用Grails类创建工具.pdf Programming Groovy. Dynamic Productivity for the Java Developer.pdf等一系列groovy资源

Global site tag (gtag.js) - Google Analytics