Springboot关掉单元测试

环境:Springboot2.x,配置如下

为东湖等地区用户提供了全套网页设计制作服务,及东湖网站建设行业解决方案。主营业务为网站建设、成都做网站、东湖网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

1. 方式一

true跳过测试且不会生成class
true会跳过测试但是会生成测试class


    
        
            org.apache.maven.plugins
            maven-surefire-plugin
            
                
                
                    org.springframework
                    springloaded
                    1.2.8.RELEASE
                
            
            
                
                
                true
            
        
    

2. 方式二(推荐使用)

true跳过测试且不会生成class
true会跳过测试但是会生成测试class
spring-boot-maven-plugin插件已经集成了maven-surefire-plugin插件,会自动运行 Junit test,因此停用自动单元测试,只需要调用true或者true即可


    
        
            org.springframework.boot
            spring-boot-maven-plugin
            
                
                
                    org.springframework
                    springloaded
                    1.2.8.RELEASE
                
            
            
                
                
                true
            
        
    

新闻名称:Springboot关掉单元测试
文章网址:http://myzitong.com/article/pdgsjc.html