fix(test): use Spring Boot 4 AutoConfigureMockMvc package and remove stub

This commit is contained in:
2026-07-07 11:25:07 +08:00
parent 6a94f53ff0
commit 4f9b3aa211
2 changed files with 1 additions and 23 deletions

View File

@@ -2,7 +2,7 @@ package com.sino.mci.admin.controller;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;

View File

@@ -1,22 +0,0 @@
package org.springframework.boot.test.autoconfigure.web.servlet;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@ImportAutoConfiguration({
org.springframework.boot.webmvc.test.autoconfigure.MockMvcAutoConfiguration.class,
org.springframework.boot.webmvc.test.autoconfigure.MockMvcWebClientAutoConfiguration.class,
org.springframework.boot.webmvc.test.autoconfigure.MockMvcWebDriverAutoConfiguration.class
})
public @interface AutoConfigureMockMvc {
}