4.0.0 com.not-6ren">
gpt4 book ai didi

java - Spring -MongoDB

转载 作者:可可西里 更新时间:2023-11-01 10:46:05 24 4
gpt4 key购买 nike

Intellij 不识别 mongodb 注释。这是我的 pom.xml 文件:

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

<groupId>com.notification</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>notification</name>
<description>somestuf</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

this is how it looks from intellij

任何建议是什么造成的?

最佳答案

我尝试了您的 pom.xml - 它在我的示例项目中运行良好。看起来有些依赖性问题。尝试“重新导入 Maven 依赖项”(项目 - 右键单击​​ - Maven - 重新导入)

关于java - Spring -MongoDB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52051747/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com