我有一个抽象课,我会这样做:
@Value("${dao.value:5}")
private Integer value;
值返回null,抽象类注释为@Configurable
此类用于注释为@Entity
的几个类中这是sping启动配置:
@SpringBootApplication
@EnableJpaRepositories("package.dao")
@ComponentScan("package.server")
@EntityScan("package.model")
@Import(LoggerRegistryClientContext.class)
@EnableSpringConfigured