环境:
springboot-CLI-2.0.1.RELEASE
控制器groovy类信息:
@Grab("thymeleaf-spring4")
@Controller
@RequestMapping("/")
class ContactController {
@Autowired
ContactRepository contactRepo
@RequestMapping(method=RequestMethod.GET)
String home(Map<String,Object> model) {
List<Contact> contacts = contactRepo.findAll()
model.putAll([contacts: contacts])
"home"
}
@RequestMapping(method=RequestMethod.POST)
String submit(Contact contact) {
contactRepo.save(contact)
"redirect:/"
}
}
具体错误信息:
D:\SpringBootCLI -GroovyProject\contacts>spring run *.groovy
Resolving dependencies...
startup failed:
General error during conversion: org.eclipse.aether.resolution.DependencyResolut
ionException: Could not find artifact :thymeleaf-spring4:jar: in local (file:/D:
/SpringBootCLI%20-GroovyProject/contacts/repository)
org.springframework.boot.cli.co