Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the failure of spring-boot-maven-plugin import of Springboot

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article, "how to solve the spring-boot-maven-plugin import failure of Springboot", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Springboot spring-boot-maven-plugin import failure how to solve" article.

Springboot spring-boot-maven-plugin import failed

Because I changed the local warehouse before, and when I opened the project, it turned red. The problem is that all the other dependencies have been directed, only this guy is dazzling red.

Find the folder under the warehouse and delete the files inside (or delete the spring-boot-maven-plugin folder directly)

Refresh here, and then there is a long wait. If the network speed is not good, you can repeat this step.

Spring-boot-maven-plugin plug-in function

The "org.springframework.boot:spring-boot-maven-plugin" plug-in is added to the POM file.

After the plug-in is added, when you run "mvn package" for packaging, it will be packaged into a JAR file that can be run directly, which can be run directly with the "Java-jar" command.

This greatly simplifies the deployment of the application and only needs to install JRE to run it.

You can specify whether Jar or Warjar is generated in POM

You can also specify the class to execute, and if not, Spring will find the class with this [public static void main (String [] args)] method as an executable class.

If you want to specify it, you can use the following two methods:

1. If your POM inherits spring-boot-starter-parent, you only need to specify the following.

Com.mycorp.starter.HelloWorldApplication

2. If your POM does not inherit spring-boot-starter-parent, you need to specify the following.

Org.springframework.boot spring-boot-maven-plugin 1.3.5.RELEASE ${start-class} ZIP repackage is about the content of this article entitled "how to solve the failure of Springboot's spring-boot-maven-plugin Import". I believe everyone has a certain understanding. I hope the content shared by the editor will be helpful to all of you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report