您好,登錄后才能下訂單哦!
https://github.com/naver/ngrinder/releases
<groupId>net.sf.grinder</groupId>
<artifactId>grinder</artifactId>
<version>3.9.1</version
import org.ngrinder.infra.config.Config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* Dynamic creation of {@link PerfTestService} depending on the cluster enable or disable.
*
* @author JunHo Yoon
* @since 3.1
*/
@Configuration
@Profile("production")
@EnableScheduling
@EnableTransactionManagement
@EnableAspectJAutoProxy
public class PerfTestServiceConfig implements ApplicationContextAware {
@Autowired
private Config config;
private ApplicationContext applicationContext;
/**
* Create PerTest service depending on cluster mode.
*
* @return {@link PerfTestService}
*/
@Bean(name = "perfTestService")
public PerfTestService perfTestService() {
if (config.isClustered()) {
return applicationContext.getAutowireCapableBeanFactory().createBean(ClusteredPerfTestService.class);
} else {
return applicationContext.getAutowireCapableBeanFactory().createBean(PerfTestService.class);
}
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
}
打包命令:
-DskipTests,不執行測試用例,但編譯測試用例類生成相應的class文件至target/test-classes下。
-Dmaven.test.skip=true,不執行測試用例,也不編譯測試用例類。
一 使用maven.test.skip,不但跳過單元測試的運行,也跳過測試代碼的編譯。
mvn package -Dmaven.test.skip=true
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。