首页 > 其他分享 >RunWith

RunWith

时间:2022-12-15 16:23:06浏览次数:36  
标签:RunWith user org import com User

package com.example.demo;
import com.example.model.User;   import com.example.util.SpringUtil; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner;     @RunWith(SpringRunner.class) @SpringBootTest JunittestmoduleApplicationTests public class JunittestmoduleApplicationTests { @Test     public void contextLoads() {          User user = (User)SpringUtil.getBean("user");          System.out.println(user.toString());   } }

标签:RunWith,user,org,import,com,User
From: https://www.cnblogs.com/cnetsa/p/16985326.html

相关文章