-
1 votesanswersviews
Spring boot starter web - 创建一个配置bean,它可以改变首先初始化的属性
我在我的spring启动应用程序中使用嵌入式tomcat . 我的要求是从db和属性文件中读取所有配置属性 . 我设法从db读取属性并使用@Configuration bean将属性附加到MutablePropertySources,如下所示: @Configuration public class PropertiesConf { @Autowired private Envi... -
0 votesanswersviews
在Spring-boot中添加Redis(spring-boot-starter-data-redis)依赖项后出错
当我将以下依赖项添加到pom.xml时 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> 以下错误来了 ... -
0 votesanswersviews
Spring可以使用Redis缓存 - GET后的EXPIRE
我正在使用带有redis的spring boot,并看到过期时间(使用 entryTtl 配置)基于对缓存的初始写入 . 我希望每次读取缓存条目时,都要扩展其TTL,比如再次调用Redis EXPIRE . 怎么用 Spring 季靴子做到这一点? -
1 votesanswersviews
Spring Boot Factory Bean创建顺序
我试图在Spring Boot中动态注册Beans,但是如果它尝试自动装配其中一个动态bean,那么创建bean的顺序总是会导致 NoSuchBeanDefinitionException . 我的设置包括两个项目,一个spring-boot-starter项目和实际的spring-boot应用程序 . 实际的应用程序注册了一个添加bean定义的 BeanDefinitionRegistryPo... -
-1 votesanswersviews
Spring Boot应用程序中百万美元和jasper文件的共存
我试过,在一个项目中都是jasper和thymeleaf,但是不能共存,因为我想用jsp必须注释掉Spring-boot-starter-thymeleaf依赖于包,这样才能运行 . 寻找解决方案,以便碧玉和百里香可以共存 . 我得到了stackoverflow的解决方案,如果有人使用servlet-context.xml(Mixing thymeleaf and jsp files in Spr... -
0 votesanswersviews
Spring Data JPA Custom Repository
尝试使用Spring Data JPA实现Custom Repositor时,我遇到了一些问题 . 我尝试按照这样的一些参考指南,但我找不到问题:https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.custom-implementations 我不知道为什么Spring会尝试将自定义存储库... -
0 votesanswersviews
使用JPA中的LocalDateTime列类型在MariaDB中创建DATETIME
我需要在JPA中使用 LocalDateTime 列类型在MariaDB中创建 DATETIME 列 . 我创建了这个实体: @Column private LocalDateTime created_at; 但是当我将代码存储在MariDB中时,列更新为 DATE . 我需要 DATETIME . 我也试过这个: @Column @Temporal(TemporalType.TIMESTA... -
0 votesanswersviews
Spring启动自定义启动器,应用程序找不到所需的bean
http://www.baeldung.com/spring-boot-custom-starter 我已经按照上面的链接提供的教程和github示例,并实现了类似的方法 . 我正在使用 spring-boot-starter-parent :2.0.0.M3 . 即使在我的自定义启动器依赖项包含在应用程序的pom中之后,它也没有在部署它时找不到 @componentScan 所需的bean ....