我有这两个模块WEB和数据库。我已将数据库设置为WEB的依赖项。当我在WEB中打开代码时,导入的数据库不再是红色的。但是,当我执行以下命令:clean,install,cargo:run时,代码失败,提示导入的代码不存在。
编辑
WEB模块中的pom.xml。它仍然无法正常工作。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>LNU-Project</artifactId>
<groupId>com.project</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>WEB</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>com.project</groupId>
<artifactId>Database</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project>