spring_reference/VII. Spring Boot CLI/55.1.2. Deduced “grab” coor...

5 lines
636 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 55.1.2. 推断"grab"坐标
Spring Boot扩展Groovy标准"@Grab"注解使其能够允许你指定一个没有group或version的依赖例如`@Grab('freemarker')`。
artifacts的组和版本是通过查看Spring Boot的依赖元数据推断出来的。注意默认的元数据是和你使用的CLI版本绑定的只有在你迁移到一个CLI新版本时它才会改变这样当你的依赖改变时你就可以控制了。在[附录](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#appendix-dependency-versions)的表格中可以查看默认元数据包含的依赖和它们的版本。