Ошибка в pom.xml в новом приложении Spring BootJAVA

Программисты JAVA общаются здесь
Anonymous
Ошибка в pom.xml в новом приложении Spring Boot

Сообщение Anonymous »

Я использую Java 21, Eclipse 25 и пытался создать приложение Spring Boot, которое показывает красные оценки в Application.java файл и в pom.xml . Я скачал этот Spring Boot Project с Spring Initiazr, то есть http://start.spring.io. Он не собирается скомпилировать и запустить.

Full Compilation Worror Log:
Full Compilath

Код: Выделить всё

[INFO] Scanning for projects...
[INFO]
[INFO] [1m-----------------< [0;36mcom.rishabh:SpringBootFundamentals[0;1m >-----------------[m
[INFO] [1mBuilding SpringBootFundamentals 0.0.1-SNAPSHOT[m
[INFO]   from pom.xml
[INFO] [1m--------------------------------[ jar ]---------------------------------[m
[INFO]
[INFO] [1m>>> [0;32mspring-boot:3.5.0:build-image[m [1m(default-cli)[0;1m > [0;1mpackage[m @ [36mSpringBootFundamentals[0;1m >>>[m
[INFO]
[INFO] [1m--- [0;32mresources:3.3.1:resources[m [1m(default-resources)[m @ [36mSpringBootFundamentals[0;1m ---[m
[INFO] Copying 1 resource from src\main\resources to target\classes
[INFO] Copying 0 resource from src\main\resources to target\classes
[INFO]
[INFO] [1m--- [0;32mcompiler:3.14.0:compile[m [1m(default-compile)[m @ [36mSpringBootFundamentals[0;1m ---[m
[INFO] Nothing to compile - all classes are up to date.
[INFO]
[INFO] [1m--- [0;32mresources:3.3.1:testResources[m [1m(default-testResources)[m @ [36mSpringBootFundamentals[0;1m ---[m
[INFO] skip non existing resourceDirectory C:\Users\ashish\Downloads\SpringBootFundamentals\SpringBootFundamentals\src\test\resources
[INFO]
[INFO] [1m--- [0;32mcompiler:3.14.0:testCompile[m [1m(default-testCompile)[m @ [36mSpringBootFundamentals[0;1m ---[m
[INFO] Nothing to compile - all classes are up to date.
[INFO]
[INFO] [1m--- [0;32msurefire:3.5.3:test[m [1m(default-test)[m @ [36mSpringBootFundamentals[0;1m ---[m
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.rishabh.SpringBootFundamentals.[1mSpringBootFundamentalsApplicationTests[m
12:41:29.775 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.rishabh.SpringBootFundamentals.SpringBootFundamentalsApplicationTests]: SpringBootFundamentalsApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
12:41:30.387 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.rishabh.SpringBootFundamentals.SpringBootFundamentalsApplication for test class com.rishabh.SpringBootFundamentals.SpringBootFundamentalsApplicationTests

.   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/  ___)| |_)| | | | | || (_| |  ) ) ) )
'  |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/

:: Spring Boot ::                (v3.5.0)

2025-05-29T12:41:33.706+05:30  INFO 10728 --- [SpringBootFundamentals] [           main] S.SpringBootFundamentalsApplicationTests : Starting SpringBootFundamentalsApplicationTests using Java 21.0.4 with PID 10728 (started by rishabh in C:\Users\ashish\Downloads\SpringBootFundamentals\SpringBootFundamentals)
2025-05-29T12:41:33.710+05:30  INFO 10728 --- [SpringBootFundamentals] [           main] S.SpringBootFundamentalsApplicationTests : No active profile set, falling back to 1 default profile: "default"
2025-05-29T12:41:39.021+05:30  INFO 10728 --- [SpringBootFundamentals] [           main] S.SpringBootFundamentalsApplicationTests : Started SpringBootFundamentalsApplicationTests in 7.128 seconds (process running for 12.721)
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK.  Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
WARNING: A Java agent has been loaded dynamically (C:\Users\ashish\.m2\repository\net\bytebuddy\byte-buddy-agent\1.17.5\byte-buddy-agent-1.17.5.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] [1;32mTests run: [0;1;32m1[m, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.35 s -- in com.rishabh.SpringBootFundamentals.[1mSpringBootFundamentalsApplicationTests[m
[INFO]
[INFO] Results:
[INFO]
[INFO] [1;32mTests run: 1, Failures: 0, Errors: 0, Skipped: 0[m
[INFO]
[INFO]
[INFO] [1m--- [0;32mjar:3.4.2:jar[m [1m(default-jar)[m @ [36mSpringBootFundamentals[0;1m ---[m
[INFO] Building jar: C:\Users\ashish\Downloads\SpringBootFundamentals\SpringBootFundamentals\target\SpringBootFundamentals-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] [1m--- [0;32mspring-boot:3.5.0:repackage[m [1m(repackage)[m @ [36mSpringBootFundamentals[0;1m ---[m
[INFO] Replacing main artifact C:\Users\ashish\Downloads\SpringBootFundamentals\SpringBootFundamentals\target\SpringBootFundamentals-0.0.1-SNAPSHOT.jar with repackaged archive, adding nested dependencies in BOOT-INF/.
[INFO] The original artifact has been renamed to C:\Users\ashish\Downloads\SpringBootFundamentals\SpringBootFundamentals\target\SpringBootFundamentals-0.0.1-SNAPSHOT.jar.original
[INFO]
[INFO] [1m


Подробнее здесь: [url]https://stackoverflow.com/questions/79643638/error-in-pom-xml-in-new-spring-boot-application[/url]

Вернуться в «JAVA»