What does it mean when it says to add a file to the classpath? Something like this:
// The configuration file we created. It must be in the classpath.
outEncryptionProps.put(WSHandlerConstants.ENC_PROP_FILE, "client_encryption.properties");
I use GGTS and I have other files other than properties file that I need to add to my project's classpath.
答案 0 :(得分:4)
类路径是用于解析类和资源的jar和目录的集合。实际上,对于这样的文件,将它们放在类路径中意味着您应该将它放在包含在类路径中的目录中,或者在编译期间将其内容复制到类路径文件夹的目录。
在Grails中,您可以将非源文件放在grails-app/conf
,src/java
或src/groovy
中,然后将它们复制到类路径中。