Spring

1. pom.xml配置fundebug-spring依赖

<dependency>
    <groupId>com.fundebug</groupId>
    <artifactId>fundebug-spring</artifactId>
    <version>0.2.0</version>
</dependency>

2. 在项目中引入fundebug并配置apikey

新增FundebugConfig.java

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import com.fundebug.Fundebug;
import com.fundebug.SpringConfig;

@Configuration
@Import(SpringConfig.class)
public class FundebugConfig {
    @Bean
    public Fundebug getBean() {
        return new Fundebug("apikey");
    }
}

注意:获取apikey需要免费注册帐号并且创建项目

可以参考Demo项目Fundebug/fundebug-spring-demo

results matching ""

    No results matching ""