Announcement Announcement Module
Collapse
No announcement yet.
How to add groovy source to classpath Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add groovy source to classpath

    I post the same question on Spring Development Tool (STS) forum but has no responses so far. Appreciate if this forum can give me some ideas:

    It's a newbie question regarding integration groovy to Java app.
    I have STS 2.3.0 with Groovy plugin and try to add groovy scripts to my Java Spring Integration project. For testing, in config.xml I have:
    Code:
    <lang:groovy id="sofieFetch" script-source="classpath:SofieFetch.groovy">
    	<lang:property name="proxyHost" value="hw1proxy"></lang:property>
    	<lang:property name="proxyPort" value="8080"></lang:property>
    </lang:groovy>
    When launching my program, I get the following error:
    Code:
    Caused by: java.io.FileNotFoundException: class path resource [SofieFetch.groovy] cannot be opened because it does not exist
    My java files are under com.myproject, and my groovy file is under com.myproject.script. Not sure why it doesn't see the groovy file

    Thanks,
    Khoa
Working...
X