org.babyfish.jimmer.spring.cfg.JimmerAutoConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-spring-boot-starter Show documentation
Show all versions of jimmer-spring-boot-starter Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.spring.cfg;
import org.babyfish.jimmer.jackson.ImmutableModule;
import org.babyfish.jimmer.spring.repository.config.JimmerRepositoriesConfig;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
@AutoConfiguration(after = DataSourceAutoConfiguration.class)
@EnableConfigurationProperties(JimmerProperties.class)
@Import({
SqlClientConfig.class,
JimmerRepositoriesConfig.class,
ErrorTranslatorConfig.class
})
public class JimmerAutoConfiguration {
@ConditionalOnMissingBean(ImmutableModule.class)
@Bean
public ImmutableModule immutableModule() {
return new ImmutableModule();
}
}