In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Import the solution that all the annotations of the maven project report errors. In view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
All annotations imported into the maven project reported the problems encountered incorrectly.
All annotations of imported maven project were reported incorrectly.
Think 1:
This project uses springboot;spring is a "big container", the creation and management of all objects are handed over to it. (SpringBoot is a framework, a new programming specification, his generation simplifies the use of the framework, the so-called simplification refers to the simplification of a large number of and tedious configuration files required in many frameworks of Spring, so SpringBoot is a framework serving the framework, and the scope of services is to simplify configuration files.
The most obvious feature is to make file configuration quite simple, application deployment simple (SpringBoot built-in server, and equipped with startup class code), you can quickly open a Web container for development. Check to see if springboot scanned these files
Result: if you look at the configuration file XML and the dependencies of each layer, there should be no error.
Think 2:
Was the imported package imported successfully? Look at the maven dependency tree (mvn dependency) and check to see if the dependency version, etc., is useful; the result: yes, the added jar package is shown on the dependency tree.
Think 3:
Ask du Niang for something; there are different methods on Baidu; I did not succeed, maybe there was something wrong with my operation or understanding of them; I decided to ask the boss, I asked the boss, who had been engaged in Android development for many years, so call another boss for me; under the guidance of another boss
Solution
First, I went to the local repository setting.xml to change the image to the aliyun image. (the following figure is the method to find the local repository configuration file setting.xml of your current maven project)
Mine is generated by default. If there is no configuration file setting.xml;, I will create a new one myself. I will not introduce many new methods here; my setting.xml is attached.
F:/eclipse_workspace20170314/repository nexus-aliyun * Nexus aliyun http://maven.aliyun.com/nexus/content/groups/public
How to modify it to aliyun image:
Then go to the local warehouse to delete the file with the suffix .lastUpdated; then download the dependency again; just those jar packages, have you solved it? Not really. Try again? Go to the local warehouse to delete the file with the suffix .lastUpdated and re-import the maven project; no. Finally, I deleted all the jar in the local warehouse, re-imported the project, re-downloaded the dependencies, and I succeeded.
Reason: there is a jar package left by the previous project in the local warehouse, and there is a conflict between different jar versions, so some jar cannot be used, or the jar package is damaged when the dependency is loaded after the project is imported. Please correct me, I am also Baidu and can understand the reason.
If you view an error, there is an error that cannot be read or that one of its jar may be a zip file, that is, the jdk version is too low. Change the jdk environment of the project, select the project properties to view and change.
Newly imported maven project comments are very popular, and all dependent packages cannot be imported.
When I first started the maven project, an open source spring boot project imported into the Internet collapsed. All the annotations were reported as errors, and they could not be downloaded depending on downloading. There was no response to clicking in idea, and the bug search in the afternoon did not completely solve the problem:
After repeated tests, we finally found the reason!
Because of my computer system, the reference path symbol% cannot be read in the configuration of maven environment variable, which leads to the failure of complete configuration of maven, even if the input mvn-v of cmd shows no problem.
The solution steps are as follows
Use the absolute path of the bin directory of the maven installation when configuring the path variable in the system variable configuration!
This bug may only be part of the small partner's system will appear, must remember to beware of mining pit!
This is the solution to the problem that all the annotations of the imported maven project are reported wrong. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.