
[英]Issue with rising heap size in a spring boot app (running in k8s)
服务说明: 这个 spring 启动应用程序本质上是一个 web 充电站套接字代理(使用 OCPP 协议通过 websocket)作为负载均衡器后面的多个节点运行,基本上保持/保持打开连接,以便其他微服务(消息的实际消费者)通过 rabbitmq 连接到此代理可以重新部署和维护。 堆转储: 这些设备 ...
[英]Issue with rising heap size in a spring boot app (running in k8s)
服务说明: 这个 spring 启动应用程序本质上是一个 web 充电站套接字代理(使用 OCPP 协议通过 websocket)作为负载均衡器后面的多个节点运行,基本上保持/保持打开连接,以便其他微服务(消息的实际消费者)通过 rabbitmq 连接到此代理可以重新部署和维护。 堆转储: 这些设备 ...
[英]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 没有报告任何问题并且应用程 ...
[英]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 ...
[英]Return error on unknown fields in JSON request body of specific controllers
我有 SpringBoot 应用程序 X,它具有面向客户的 API。 这些 API 接收请求主体为 JSON。 应用程序 X 向应用程序 Y 发出 API 调用并接收主体为 JSON 的响应。 我想阻止应用程序 X 在面向客户的控制器上的请求正文中接收未知字段。 我在考虑spring.jackson ...
[英]Add certificates to global Java truststore in code (programatically)
我有我的 Spring 引导应用程序的 Kube.netes 部署,我曾经在引导程序中使用keytool更新全局 Java cacerts :keytool -noprompt -import -trustcacerts -cacerts -alias $ALIAS -storepass $PAS ...
[英]Spring data jpa "IN" clause using specification
我正在尝试使用 spring 数据 jpa Speicification API 从数据库中获取记录。在这里我需要为状态列的“In”子句添加条件,因为我的代码如下所示。 上面的代码在 cosole 中生成查询,如下所示 当我将查询带入数据库工具并传递值时,我正在获取数据。 但是从应用程序运行时我没有 ...
[英]Repository method findById with underscore Spring Boot
在实体 class Flights 中,我有字段 private City flight_from 和 private City flight_to 并且我需要存储库方法通过 flight_from 的 id 返回航班。 我正在尝试这样做: 我试过 findByFlightToId、findByF ...
[英]Swagger UI OpenAPI 3, query parameters displayed as an object instead of value-changeable fields
以前在 SpringBoot v2.5.7 中,我有这个 Spring REST controller 方法。 它有一个TestCriteria类型的 DTO,作为路径参数。@GetMapping(path = "/test") public void test(TestCriteria testC ...
[英]Spring boot not ignoring data.sql during tests
我希望我的 spring 引导存储库测试在执行测试时不使用src/main/resources中定义的data.sql文件。 我正在运行 spring 引导版本3.0.1 目前,我在src/main/resources中定义了一个application.yaml文件,其中包含以下内容: 我有data ...
[英]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 ...
[英]Unable to create Custom Spring Boot Starter/AutoConfiguration
自定义启动项目命名为:hello-service-spring-boot-start 项目目录结构为: hello-service-spring-boot-start目录结构在 pom.xml 在 Starter Class 或 HelloServiceSpringBootStartApplica ...
[英]Springboot Reactive findByusername return "monomap" by r2dbc
我正在用 mysql 和 r2dbc 编写反应式 springboot。当我用 findByUsername 编写查询时,它只返回一个字符串“monotype”而不是 object。 代码: 我的存储库: 任何人有想法吗? ...
[英]Compare DateTime field in Mongo DB with given Date using Criteria in Kotlin Springboot
我有一个要求,我需要使用提供的 referenceDate 过滤 mongo db 中的记录。 dateTimeValidUntil 在数据库中存储为 LocalDateTime。 数据库中的数据: 我的查询: 但它不会过滤掉在前一个日期结束的记录,例如当 refDate = 2023-01-01 ...
[英]More than 1 caching storage in spring boot app
我面临一个奇怪的问题 - 我的项目中有 hazelcast 和 redis。 突然间,所有@Cacheable注释都只将条目放入 hazelcast 缓存,即使特定的缓存名称是通过 redis 缓存构建器配置的: 使用缓存: 两者都不起作用,只能将请求转发给 hazelcast。 如何解决这个问题? ...
[英]Spring-boot local repository 2.7.5 not working
根据 intellij,尝试使用 spring-boot 项目的本地存储库失败,但项目正在编译并且依赖项存在。 有没有可能一切都很好,但 intellij 错误标志是错误的? 在父版本 2.7.5 上与中央存储库一起工作正常与父 2.3.0-RELEASE 上的本地存储库一起正常工作谢谢。 ...
[英]Getting an error during dockerizing the spring boot application
我已经在我的项目中添加了 Dockerfile、.env 和 docker-compose.yml 和 ./mvnw clean package && docker-compose build && docker-compose up 在终端中运行这些命令时出现错误, ...
[英]Error creating bean with name 'abcController': Unsatisfied dependency expressed through field 'Employeeepository'
我无法解决这个错误不满足的依赖”通过字段'employeeRepository'表达我添加了@EntityScan("base package")并尝试了 inte.net 上可用的许多解决方案,但仍然无法解决。 主申请 class Controller 实体 class 错误日志 ...
[英]Unit test returns 401 Unauthorized on a permitted route in Spring WebFlux Security
我正在尝试测试返回对象数组的路由,但测试失败,因为它返回 Unauthorized 而不是 200 OK 我的测试 class 而ApplicationSecurityConfig class,有一个SecurityWebFilterChain Bean JUint 测试错误显示如下 java. ...
[英]How to write jdbc inbound channel adapter programmatically to read data from DB and pass to output channel?
我是 spring 集成的新手,我想以编程方式编写以下流程我有下面的入站通道适配器,我在其中查询数据库并将其传递给 OutChannel,然后从 OutChannel 传递给 AccountOutputChannel。 AccountOutputChannel 具有 class 的引用,当消息在 ...
[英]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 ...