cost 319 ms
spring 引导应用程序(在 k8s 中运行)中不断增加的堆大小问题

[英]Issue with rising heap size in a spring boot app (running in k8s)

服务说明: 这个 spring 启动应用程序本质上是一个 web 充电站套接字代理(使用 OCPP 协议通过 websocket)作为负载均衡器后面的多个节点运行,基本上保持/保持打开连接,以便其他微服务(消息的实际消费者)通过 rabbitmq 连接到此代理可以重新部署和维护。 堆转储: 这些设备 ...

Spring 引导 JPA 错误:无法提取 position `7` 的 JDBC 值

[英]Spring Boot JPA error: Unable to extract JDBC value for position `7`

尝试学习如何使用 Spring Boot (3.0.2)。 我用 Intellij Idea 创建了 Spring Boot 项目。 我与 JPA Buddy 创建的实体和存储库。 Controller 注解为@RestController Intellij Idea 没有报告任何问题并且应用程 ...

如何使用 Micrometer Tracing 将 TracingClientHttpRequestInterceptor 与 RestTemplate 的使用迁移到 springboot 3?

[英]how to migrate usage of TracingClientHttpRequestInterceptor with RestTemplate to springboot 3 with Micrometer Tracing?

我开始将服务迁移到 SpringBoot 3,现在我有一个使用org.springframework.cloud.sleuth.instrument.web.mvc.TracingInterceptor的问题代码 我没有在新的 Micrometer Tracing API 中找到org.sprin ...

特定控制器的 JSON 请求正文中的未知字段返回错误

[英]Return error on unknown fields in JSON request body of specific controllers

我有 SpringBoot 应用程序 X,它具有面向客户的 API。 这些 API 接收请求主体为 JSON。 应用程序 X 向应用程序 Y 发出 API 调用并接收主体为 JSON 的响应。 我想阻止应用程序 X 在面向客户的控制器上的请求正文中接收未知字段。 我在考虑spring.jackson ...

Spring 数据 jpa 使用规范的“IN”子句

[英]Spring data jpa "IN" clause using specification

我正在尝试使用 spring 数据 jpa Speicification API 从数据库中获取记录。在这里我需要为状态列的“In”子句添加条件,因为我的代码如下所示。 上面的代码在 cosole 中生成查询,如下所示 当我将查询带入数据库工具并传递值时,我正在获取数据。 但是从应用程序运行时我没有 ...

带下划线的存储库方法 findById Spring Boot

[英]Repository method findById with underscore Spring Boot

在实体 class Flights 中,我有字段 private City flight_from 和 private City flight_to 并且我需要存储库方法通过 flight_from 的 id 返回航班。 我正在尝试这样做: 我试过 findByFlightToId、findByF ...

如何使用用户 ID 以外的变量从数据库中检索用户

[英]How to retrieve a Users from a database using a variable other than User Id

我有一个 Spring Boot 应用程序,其中有一个 model 用户,当我点击前端 React 应用程序上的提交按钮时,我试图检索具有相同用户名的用户。 它说它无法检索,我不知道到底出了什么问题。 我收到此错误。 xhr.js:247 GET http://localhost:8080/cal ...

使用 Kotlin Springboot 中的条件将 Mongo DB 中的 DateTime 字段与给定日期进行比较

[英]Compare DateTime field in Mongo DB with given Date using Criteria in Kotlin Springboot

我有一个要求,我需要使用提供的 referenceDate 过滤 mongo db 中的记录。 dateTimeValidUntil 在数据库中存储为 LocalDateTime。 数据库中的数据: 我的查询: 但它不会过滤掉在前一个日期结束的记录,例如当 refDate = 2023-01-01 ...

spring 启动应用程序中有超过 1 个缓存存储

[英]More than 1 caching storage in spring boot app

我面临一个奇怪的问题 - 我的项目中有 hazelcast 和 redis。 突然间,所有@Cacheable注释都只将条目放入 hazelcast 缓存,即使特定的缓存名称是通过 redis 缓存构建器配置的: 使用缓存: 两者都不起作用,只能将请求转发给 hazelcast。 如何解决这个问题? ...

Spring-boot 本地存储库 2.7.5 不工作

[英]Spring-boot local repository 2.7.5 not working

根据 intellij,尝试使用 spring-boot 项目的本地存储库失败,但项目正在编译并且依赖项存在。 有没有可能一切都很好,但 intellij 错误标志是错误的? 在父版本 2.7.5 上与中央存储库一起工作正常与父 2.3.0-RELEASE 上的本地存储库一起正常工作谢谢。 ...

创建名称为“abcController”的 bean 时出错:通过字段“Employeeepository”表示的依赖性不满足

[英]Error creating bean with name 'abcController': Unsatisfied dependency expressed through field 'Employeeepository'

我无法解决这个错误不满足的依赖”通过字段'employeeRepository'表达我添加了@EntityScan("base package")并尝试了 inte.net 上可用的许多解决方案,但仍然无法解决。 主申请 class Controller 实体 class 错误日志 ...

单元测试返回 401 Unauthorized on a permitted route in Spring WebFlux Security

[英]Unit test returns 401 Unauthorized on a permitted route in Spring WebFlux Security

我正在尝试测试返回对象数组的路由,但测试失败,因为它返回 Unauthorized 而不是 200 OK 我的测试 class 而ApplicationSecurityConfig class,有一个SecurityWebFilterChain Bean JUint 测试错误显示如下 java. ...

如何以编程方式编写 jdbc 入站通道适配器以从数据库读取数据并传递到 output 通道?

[英]How to write jdbc inbound channel adapter programmatically to read data from DB and pass to output channel?

我是 spring 集成的新手,我想以编程方式编写以下流程我有下面的入站通道适配器,我在其中查询数据库并将其传递给 OutChannel,然后从 OutChannel 传递给 AccountOutputChannel。 AccountOutputChannel 具有 class 的引用,当消息在 ...

jpa查询怎么写? 在存储库中

[英]how to write jpa query? in repository

在此处输入图像描述此 img 是用户表和示例元组, 我想使用 sql 查询“SELECT MAX(KEY_NAME) FROM USER;” 然后在此处输入图片描述所以在 java 中,我写了 jpa 查询,但遇到错误 16148 2023-02-01 20:58:51.668 错误 16148 ...


 
粤ICP备18138465号  © 2020-2023 STACKOOM.COM