Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 EL 在我的 GSP 中显示字符串。
${grails.util.Holders.config.dataSource.url}
我只想显示最后十个字符。关于我如何做到这一点的任何想法?
谢谢
${grails.util.Holders.config.dataSource.url[-10..-1]}
请参阅文档: http: //groovy.codehaus.org/JN1525-Strings