报错如下:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.RELEASE:repackage (default) on project app-app-managerment: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.RELEASE:repackage failed: Unable to find a single main class from the following candidates [com.app.appment.AppAppManagementApplication, com.app.appment.utils.QRCodeUtils]
报错截图:
这个原因是因为找不到一个主类,即有可能有多个main方法,或者一个main方法也没有;这里的原因就是因为在启动类中有一个main方法,在QRCodeUtils类中也有一个main方法,QRCodeUtils里面的main注释掉即可: