org.jlot.client.config.ClientConfig Maven / Gradle / Ivy
package org.jlot.client.config;
import javax.inject.Inject;
import org.jlot.client.configuration.Console;
import org.jlot.client.configuration.UserConsole;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.MessageSourceAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
@Configuration
@ComponentScan(basePackages = { "org.jlot.client", "org.jlot.api", "org.jlot.core.utils" })
public class ClientConfig
{
@Inject
private MessageSource messageSource;
@Bean
public Console console ( )
{
return new UserConsole();
}
@Bean
public ObjectMapper objectMapper ( )
{
return new ObjectMapper();
}
@Bean
public MessageSourceAccessor messageSourceAccessor ( )
{
return new MessageSourceAccessor(messageSource);
}
}