当前位置: 代码迷 >> 综合 >> springboot新建一个无启动类的common-driver节点
  详细解决方案

springboot新建一个无启动类的common-driver节点

热度:48   发布时间:2023-09-20 00:28:44.0

springboot自己添加jar包引用时,使用springtoolsuit新建一个springboot工程后,去掉主启动类,test包下面的test文件,pom.xml文件中去掉test坐标,比如添加自己的oracle的jar包如下:

        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/java/lib/ojdbc6-11.2.jar</systemPath>
          </dependency>

并且pom.xml文件中去掉自己的build的plugin,否则maven install时候报错,测试或者compile error

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

  相关解决方案