About error creating bean with name ‘xxxxx’: invocation of init method

The information found on the Internet is that this kind of exception is usually caused by wrong package import, missing, conflict and wrong version.

Before reporting this error again, I added, deleted and modified it pom.xml File, right-click project – & gt; Maven – & gt; update project, project – & gt; clean, etc. these operations are used to modify and update the project as a whole. It’s not good to directly locate the specific reason. So I went through the exception record carefully, and I checked in a java file that reported an error. I found that the point that reported an error was the override annotation. This is the reason why override annotation is not supported. Combined with previous experience, it is judged that the compiler version is low.

Solutions: 1. Right click on the project – & gt; build path – & gt; configure build path (then change the default 1.5 to your own JRE version: specifically, delete 1.5, and then add library – & gt; JRE system library – & gt; workspace default library (generally higher than 1.5, now at least 1.7, 1.8)).

2. Right click Project – & gt; properties – & gt; Java compiler. Remove the check “use compliance from execution environment on the Java build path”. Then, choose your own java version.


Read More: