简体   繁体   English

如何在 vs 代码中运行 spring 引导 groovy 项目

[英]How to run a spring boot groovy project in vs code

made the default build of spring boot application using groovy (maven builder) in visual studio code when trying to run it gives the error "Failed to run this project 'demo' because it does not contain any main class."在尝试运行它时使用 Visual Studio 代码中的 groovy(maven builder)创建了 spring 引导应用程序的默认构建,它给出了错误“无法运行此项目'demo',因为它不包含任何主要的 ZA2F2ED4F8DCECC2CBB4ZC21。” opened the same project in IntelliJ IDEA everything worked在 IntelliJ IDEA 中打开同一个项目一切正常

Groovy is an agile dynamic language for Java virtual machine, which is finally compiled into.class bytecode file to run the project. Groovy是Java虚拟机的敏捷动态语言,最终编译成.class字节码文件运行项目。

Try to compile the groovy file which includes main method manually, then under Maven Selections, right click the project name, clean and compile the project again.尝试手动编译包含 main 方法的 groovy 文件,然后在Maven选择下,右键单击项目名称,清理并再次编译项目。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM