国产片侵犯亲女视频播放_亚洲精品二区_在线免费国产视频_欧美精品一区二区三区在线_少妇久久久_在线观看av不卡

服務(wù)器之家:專(zhuān)注于服務(wù)器技術(shù)及軟件下載分享
分類(lèi)導(dǎo)航

PHP教程|ASP.NET教程|Java教程|ASP教程|編程技術(shù)|正則表達(dá)式|C/C++|IOS|C#|Swift|Android|VB|R語(yǔ)言|JavaScript|易語(yǔ)言|vb.net|

香港云服务器
服務(wù)器之家 - 編程語(yǔ)言 - Java教程 - 聊聊springboot2.2.3升級(jí)到2.4.0單元測(cè)試的區(qū)別

聊聊springboot2.2.3升級(jí)到2.4.0單元測(cè)試的區(qū)別

2022-02-20 11:49小瑞 Java教程

這篇文章主要介紹了springboot 2.2.3 升級(jí)到 2.4.0單元測(cè)試的區(qū)別,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

springboot2.2.3升級(jí)到2.4.0單元測(cè)試區(qū)別

原先單元測(cè)試 import org.junit.Test; 然后運(yùn)行正常,現(xiàn)在運(yùn)行報(bào)錯(cuò),

聊聊springboot2.2.3升級(jí)到2.4.0單元測(cè)試的區(qū)別

?
1
import org.junit.Test;

換成

?
1
import org.junit.jupiter.api.Test;

后運(yùn)行正常。

單個(gè)單元測(cè)試的這樣沒(méi)有問(wèn)題了,但是我批量執(zhí)行的還是會(huì)報(bào)上面的錯(cuò)誤

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
@Suite.SuiteClasses({
        //dao層測(cè)試類(lèi)
    
        //service層測(cè)試類(lèi)
        CheckConfigServiceTest.class,
        AfterCheckConfigServiceTest.class,
        
        //control層測(cè)試類(lèi)
        //WebTestControllerTest.class      
        //util測(cè)試類(lèi)      
    })
@RunWith(Suite.class
public class BatchTest {
}

最后確實(shí)沒(méi)有解決整合測(cè)試也稱(chēng) 打包測(cè)試的@Suite.SuiteClasses方法,不過(guò)找到了別的批量執(zhí)行單元測(cè)試的方法,

在src/test/java 文件夾右鍵,run as -> junit test 一樣可以批量執(zhí)行!!!

springboot2.4降級(jí)到boot2.2.x

最近在做一個(gè)springcloud的整合項(xiàng)目,但是springcloud-alibaba的nacos只支持2.2.x版本,而項(xiàng)目開(kāi)始也沒(méi)注意,直接用的2.4版本,所以這里記錄下降級(jí)踩下的坑。

這里直接把boot版本號(hào)改成2.2.6然后去啟動(dòng)主啟動(dòng)類(lèi)會(huì)出現(xiàn)

?
1
2
3
4
5
6
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.6.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

以下提示:我的spring和我的boot不兼容,我boot版本太低,讓我改成2.3或者是2.4

***************************
APPLICATION FAILED TO START
***************************

Description:

Your project setup is incompatible with our requirements due to following reasons:

- Spring Boot [2.2.6.RELEASE] is not compatible with this Spring Cloud release train


Action:

Consider applying the following actions:

- Change Spring Boot version to one of the following versions [2.3.x, 2.4.x] .
You can find the latest Spring Boot versions here [https://spring.io/projects/spring-boot#learn].
If you want to learn more about the Spring Cloud Release train compatibility, you can visit this page [https://spring.io/projects/spring-cloud#overview] and check the [Release Trains] section.
If you want to disable this check, just set the property [spring.cloud.compatibility-verifier.enabled=false]

Process finished with exit code 1

我這邊直接把springcloud版本一起降低改成H版本

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<properties>
      <java.version>1.8</java.version>
      <spring-cloud.version>Hoxton.SR9</spring-cloud.version>
  </properties>
  <dependencyManagement>
      <dependencies>
          <dependency>
              <groupId>org.springframework.cloud</groupId>
              <artifactId>spring-cloud-dependencies</artifactId>
              <version>${spring-cloud.version}</version>
              <type>pom</type>
              <scope>import</scope>
          </dependency>
      </dependencies>
  </dependencyManagement>

再次啟動(dòng),發(fā)現(xiàn)可以了,好了不多bb了,我要去改接下去其他模塊了

聊聊springboot2.2.3升級(jí)到2.4.0單元測(cè)試的區(qū)別

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持服務(wù)器之家。

原文鏈接:https://blog.csdn.net/xiaxiaorui2003/article/details/110147666

延伸 · 閱讀

精彩推薦
1097
主站蜘蛛池模板: 三级黄色片在线观看 | 亚洲日韩成人 | 美女操av| 亚洲一区二区三区视频 | 久久久久久久久国产 | 日本一区二区三区精品视频 | 91视频入口| 久久国产一区 | 日韩午夜电影 | 欧美激情一区 | 国产精品第一国产精品 | 99热在线观看免费 | 日韩成人av电影在线观看 | 亚洲高清www | 国产精品久久久久久久久久ktv | 日韩成人av电影 | 国产中文字幕网 | 欧美精品一区二区三区中文字幕 | 久操色 | 日本人在线观看 | 久久夜色精品国产 | 欧美成年网站 | 午夜国产精品成人 | 亚洲国产色视频 | 日韩成人小视频 | 一区二区三区四区电影 | 成人午夜视频在线播放 | 精品视频一区二区三区四区 | 欧美一级高清免费 | 国产中文字幕亚洲 | 天堂v在线视频 | 午夜精品福利在线观看 | 亚洲免费片 | 日韩国产一区二区三区 | 国产伦精品一区二区三区照片91 | 午夜伦4480yy私人影院 | 亚洲国产aⅴ成人精品无吗 久久久91 | 国产最新一区 | 国产精品成人一区二区三区夜夜夜 | 一级毛片免费看 | 91亚洲精品一区 |