cost 272 ms
使用@RequestBody 将JSON 映射到带有@Builder 的类

[英]Use @RequestBody to map JSON to a class with @Builder

我正在使用@RequestBody将 POST 请求的 JSON 正文映射到我的 java 类。 我的 POST 请求最初工作正常,但是当我将@Builder注释添加到我的 java 类时,它开始失败。 我在徘徊如何使用@RequestBody将 JSON 映射到带有 @Builder 注释的类我的 ...

Spring RestController 不拆分 RequestParam Set<string> 如果设置,则由逗号语法提供<string>包裹在一个物体内</string></string>

[英]Spring RestController not splitting RequestParam Set<String> provided by comma syntax if Set<String> is wrapped inside an object

我有一个接受 Set as RequestParam 的端点。 这适用于两种类型的集合请求参数分配,导致集合内有 3 个元素。 但是,如果我将集合移动到包装类中 @ResponseStatus(OK) @GetMapping(value = "/people") public PeopleResp ...

创建名为“sessionFactory”的 bean 时出错

[英]Error creating bean with name 'sessionFactory'

我是 JAVA 的新手,也检查了与此问题相关的所有其他答案,但仍然无法解决。 部署时我有 WAR 文件,但出现错误 catalina.2022-12-12.log 本地主机.2022-12-12.log 使用 Tomcat 8.5.84,JDK 1.8。 我应该怎么做才能摆脱这个 sessionF ...

无法解析 AuthorizationManagerRequestMatcherRegistry 中的方法“antMatchers()”

[英]Cannot resolve method 'antMatchers()' in AuthorizationManagerRequestMatcherRegistry

我目前正在关注Spring 文档和一些关于 Web 安全性的教程。 但是现在我有一个问题,我不能调用方法antMatchers 。 这是我在构建项目时遇到的错误: 以我的理解,我应该可以使用这个方法,所以我可以允许或不允许HTTP对某个URL的请求。那么我的问题是,为什么不能使用antMatche ...

如何在springmvc中处理rest api中的字典转换

[英]how to process dictionary convert in the rest api in springmvc

在系统中,它在 mysql 中有一些字典数据存储,我需要将字段转换为其 ID,以便我可以保存关系或报告此转换失败。为了简化问题。我假设我是三个字典,它ddl是 我需要实现三个 api 参数包括它们的两个组合。 他们可能看起来像: 有代码 map 他们到 id,在多个地方使用。 查询 t_dict1 ...

未经授权的错误:需要完全身份验证才能使用 spring.security v.6 访问此资源

[英]Unauthorized error: Full authentication is required to access this resource with spring.security v.6

所以我是 Spring Security 的新手,我尝试使用 REST 服务构建一个 Spring Boot 应用程序,并使用 JWT 实现 Spring Security。我大部分时间都遵循了安全教程,我让应用程序运行但是当我尝试调用authentication(/auth/**) 端点我刚收到 ...

Trim Job 在 STS 中遇到问题

[英]Trim Job has encountered a problem in STS

在 STS 中,当我单击清除控制台按钮时,会出现以下消息发生内部错误。 class org.eclipse.ui.internal.console.ansi.participants.AnsiPosition 无法转换为 class mnita.ansiconsole.participants.A ...

com.pzh.code.archyonix.service.impl.db1.UserServiceImpl中构造函数的参数0需要一个类型的bean

[英]Parameter 0 of constructor in com.pzh.code.archyonix.service.impl.db1.UserServiceImpl required a bean of type

描述: com.pzh.code.chion.service.impl.db1.UserServiceImpl 中构造函数的参数 0 需要找不到类型为“com.pzh.code.chion.repository.db1.UserRepository”的 bean。 行动: 考虑在您的配置中定义类 ...

腰部的用户特定信息

[英]User specific information upon loin

我正在寻找一个用户可以登录和注册的网站。 一旦注册并登录,我希望他们能够看到他们自己的客户列表,并为用户执行一些功能配置(例如,从他们注册的电话号码发送短信)。 我看过很多关于如何实现登录和注册功能的教程。 但是我不知道如何使显示的信息针对每个客户? 有人可以为我指出正确的方向来帮助我做这样的事情吗 ...

Spring 引导 - 添加歌曲后无法使用从 Postman 获取:NoSuchElementException (Spring) 和内部服务器错误(邮递员)

[英]Spring Boot - Cannot use get from Postman after adding a song: NoSuchElementException (Spring) and Internal Server Error (postman)

我们的老师要求我们创建一个 spring 引导应用程序来管理具有一对多关系的歌曲和专辑使用 DTO,但是我们需要在 controller 中手动进行映射,我们不能使用外部库。 关键是,无论我如何尝试更改方法,它总是会导致 Spring 错误(我们使用 PostgreSQL 并且在 pgadmin ...

Spring-boot:引起:java.lang.IllegalArgumentException:不是托管类型:class com.smart.entities.User

[英]Spring-boot : Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.smart.entities.User

我是 springboot 的新手,在尝试使用我设置的 userRespository 时出现此错误“Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.smart.entities.User”。 ...

Spring 框架从 3.2.9 升级到 5.3.22 和 URL 结束后.html 停止工作

[英]After Spring framework upgrade from 3.2.9 to 5.3.22 and URL ending with .html stop working

我有一个使用 Spring 框架版本 3.2.9.RELEASE 并升级到 5.3.22 的应用程序,到目前为止,我还没有进行任何配置更改。 我的 DispatcherServlet.xml 和所有 web.xml 配置都是原样。 但是在这次升级之前,我有一个带有 @RequestMapping(" ...

SpringBoot 2.7.5 - @Value 注释不从 application.properties 文件分配任何值

[英]SpringBoot 2.7.5 - @Value annotation not assigning any values from application.properties file

我正在使用 Spring Boot 2.7.5 在使用@Value注释从application.properties文件注入值时,对@Configuration类下的变量进行空赋值。 例子: 在这里,我看到了对变量fileName的赋值。理想情况下,如果键不匹配,它应该赋值'${file.name} ...

如何测试正在调用外部 REST API 的 springboot controller

[英]How to test a springboot controller that is calling an external REST API

我有一个购物篮微服务,它正在调用外部付款 REST API 以在结账时付款。 如何测试将调用外部 REST 服务进行付款的 BasketController? 有没有办法模拟这个 rest 服务? 感谢任何参考链接或类似的代码示例。 ...

GetMapping 到 Spring Boot 中的方法不起作用

[英]GetMapping to Method in Spring Boot Isn't Working

我正在跟随一个带有 maven 的 SpringBoot 教程,当我尝试将 index() 方法与@GetMapping时,当程序运行时,我只能在本地主机上看到这个: Whitelabel Error Page 此应用程序没有明确的 /error 映射,因此您将其视为后备。 Sun Dec 04 ...

controller上的SpringBoot页面重定向错误

[英]SpringBoot Page redirection error on controller

我已经尝试了很多,但找不到原因,所以我正在注册一个问题。 下面三个例子是根据输入得到的output的结果。 'login_success' 和 'login_failed' 都是模板路径中的 html 页。 在失败的调试结果中未执行方法“loginSuccess()”或“loginFailed() ...


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