package ${basePackage}.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ${basePackage}.frame.auth.LocalData;
import ${basePackage}.frame.auth.Token;

import javax.annotation.PostConstruct;

@Configuration
public class TestConfig {

    @Autowired
    private ApplicationContext applicationContext;

    @PostConstruct
    public void initLocalData() {
    LocalData.setApplicationContext(applicationContext);
    }

    @Bean
    public Token getTestToken() {
        Token token = new Token();
        token.setId(0);
        token.setUserId(0);
        token.setUserName("system");
        return token;
    }
}