Intellij Idea Intellij SpringBoot Maven依赖问题

dnph8jn4  于 2023-08-03  发布在  Spring
关注(0)|答案(2)|浏览(121)

我是Maven和SpringBoot的新手。我试图在Intellij中运行Maven SpringBoot项目,但依赖关系没有得到解决。我已经尝试了所有我能找到的东西,但他们没有工作。下面是我的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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <groupId>com.optum.csp-claims</groupId>
    <artifactId>claims-benefit-period-post</artifactId>
    <version>1.1.4</version>
    <name>claims-benefit-period-post</name>
    <description>Post process for Claims benefit period calc</description>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <properties>
        <slf4j.slf4j-simple.version>1.6.2</slf4j.slf4j-simple.version>
        <oracle.jdbc.version>12.2.0.1</oracle.jdbc.version>
        <squareup.mockwebserver.version>3.10.0</squareup.mockwebserver.version>
        <sun.mail.version>1.6.2</sun.mail.version>
        <kie.kie-api.version>7.39.0.Final</kie.kie-api.version>
        <benefit_periods.version>1.0.4-SNAPSHOT</benefit_periods.version>
        <splunk.logging.version>1.6.0</splunk.logging.version>
        <qos.logback.version>0.1.5</qos.logback.version>
    </properties>    
    <dependencies>
        <dependency>
            <groupId>com.abc.abc</groupId>
            <artifactId>abc</artifactId>
            <version>${abc.version}</version>
        </dependency>   
        <dependency>
            <groupId>com.oracle.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
            <version>12.2.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>${sun.mail.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web-services</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.9.2</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.9.2</version>
        </dependency>
        <dependency>
            <groupId>org.abc</groupId>
            <artifactId>abc-spring</artifactId>
            <version>${abc.abc-abc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-compiler</artifactId>
            <version>${abc.abc-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-core</artifactId>
            <version>${abc.abc-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-workbench-models-guided-dtable</artifactId>
            <version>${abc.abc-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jbpm</groupId>
            <artifactId>jbpm-bpmn2</artifactId>
            <version>${kie.kie-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jbpm</groupId>
            <artifactId>jbpm-flow-builder</artifactId>
            <version>${kie.kie-api.version}</version>
        </dependency>
        <dependency>
            <groupId>com.splunk.logging</groupId>
            <artifactId>splunk-library-javalogging</artifactId>
            <version>${splunk.logging.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback.contrib</groupId>
            <artifactId>logback-json-classic</artifactId>
            <version>${qos.logback.version}</version>
        </dependency>       
        <dependency>
            <groupId>ch.qos.logback.contrib</groupId>
            <artifactId>logback-jackson</artifactId>
            <version>${qos.logback.version}</version>
        </dependency>
        <dependency>
           <groupId>org.json</groupId>
           <artifactId>json</artifactId>
           <version>20200518</version>
        </dependency>
    </dependencies>    
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>build-info</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <mainClass>com.abc.-----</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

字符串
下面是我得到的错误:

Cannot resolve com.oracle.jdbc:ojdbc8:12.2.0.1
Cannot resolve com.splunk.logging:splunk-library-javalogging:1.6.0
Cannot resolve com.abc:abc:1.0.4-SNAPSHOT


任何帮助是非常感谢!先谢谢你了。

e1xvtsh3

e1xvtsh31#

进入chrome中的spring Initializr,点击maven和语言java change groupid(包名)和artifactid(项目名),选择add dependencies按钮,搜索dependencies并添加,然后点击生成zip文件后,将生成zip文件,解压并自动导入intellij,依赖关系将被注入到您的maven spring Boot 项目中。这里是spring初始化链接“https://start.spring.io/“。

whlutmcx

whlutmcx2#

必须更改Java版本,然后清除并更新Maven。

相关问题