spring-async 相关问题


如何解决加载响应数据失败:未找到具有给定标识符的资源的数据

发布API 导出 const resendInvitation = async (userName) => { wait API.post( 'delta-api',user-mgmt/users/${userName}/resendInvitation, {} ); }; const handleResendInvitation = async () =>...


onDidReceiveBackgroundNotificationResponse 在颤振本地通知中未触发

这是我的void main函数: Future RemoteMessageHandler(RemoteMessage 消息) async {} 无效 main() 异步 { WidgetsFlutterBinding.ensureInitialized(); 等待 Firebase.initializeA...


将 Spring Security 5 迁移到 Spring Security 6 HttpSecurity 问题

Spring Security 6 中以下代码应该替代什么? http .authorizeRequests() .requestMatchers("/hub/**").access("hasPermission('SOME_LAYER', '')")...


Spring Boot 版本与 Java 11 兼容

大家好,目前我正计划将具有 spring 版本 4.0.6 和 java 8 的独立 spring 应用程序迁移到具有 java 11 的 Spring boot 应用程序。所以,继续使用 spring boot


grpc-spring-boot-starter - 如果我将 spring-boot-starter-jdbc 添加到依赖项中,netty 服务器不会启动

我开始用spring boot测试grpc,我使用net.devh中提供的GrpcService:grpc-spring-boot-starter(https://yidongnan.github.io/grpc-spring-boot-起动器/en/)。 它隔离效果很好...


如何创建松果客户端,它给出错误

存在于松果.ts 中 从 '@pinecone-database/pinecone' 导入 { PineconeClient } 导出 const getPineconeClient = async () => { const client = new PineconeClient() 等待客户。


如何在Spring Boot 3和Spring Framework 6中注册拦截器

我正在使用 Spring Boot 3.1.0-SNAPSHOT 构建后端,它使用 Spring Framework 6x。 拦截器: @Slf4j 公共类 MyInterceptor 实现 HandlerInterceptor { @覆盖 公众嘘声...


从discord js中的嵌入数组中获取项目

所以我使用此代码获得了交互嵌入: client.on('interactionCreate', async (interaction) => { if (!interaction.isButton()) 返回; const raidembed = 交互.消息.嵌入 ...


如何使用Jest函数的动态替换?

我有一系列这样的测试用例: it('应该禁用渲染按钮', async () => { 使成为(...); const 按钮 = screen.getByRole("按钮"); 期待(按钮).toBeDi...


在 Caml Async 中等待 Writer.write 完成

我有以下简单的 OCaml 异步作业,该作业应该写入文件并终止进程。 Unix.openfile "foobar" ~mode:[`Creat;`Rdwr] >>= 有趣的 fd -> 让 wr = Writer.cre...


Jaxb2Marshaller 与 Spring boot 3+ 和 Jaxb 4 兼容吗?

我正在将我的项目从 Spring Boot 2.7 升级到 Spring Boot 3.1。在这个项目中仍然使用 SOAP,因此我们依赖 Jaxb 和 spring WS。 我正在使用 com.helger.maven 生成 Java 类:


NestJS 8 - 无需构造函数即可注入服务

我正在尝试使用 ConfigModule 加载配置,如下所示 ConfigModule.forRoot({ 忽略EnvFile:真, 是全局的:正确的, 加载:[async () =>等待 fetchConfig(new


Spring @Transactional 迁移到 Spring 5 后不起作用

我最近将应用程序从带有 AspectJ 1.8.10 的 Spring 4.3.x 和 JDK 8 升级到带有 Spring 5.3.x 和 AspectJ 1.9.20.1 的 JDK 17,并且事务注释似乎不起作用 在应用中...


为什么 File.ReadAllLinesAsync() 会阻塞 UI 线程?

这是我的代码。读取文件行的 WPF 按钮的事件处理程序: private async void Button_OnClick(对象发送者, RoutedEventArgs e) { Button.Content = "正在加载..."; 变种


bean“mvcHandlerMappingIntrospectorRequestTransformer”无法注册。具有该名称的 bean 已被定义并覆盖 i

环境:Spring Boot 3.2.1、JDK 21、GraalVM、Spring Native、Spring Security。错误 微软Windows [版本10.0.22631.2861] (c) 微软公司。版权所有。 。 ____ ...


Spring Boot api 在多次成功的 200 响应后给出 403

我有一个 Spring Boot 应用程序,它使用 spring security 作为依赖项。我正在将 Spring boot 版本从 2.7.16 迁移到 3.2.1。在 2.7.16 版本中一切正常。但在 3.2.1 中,其余 API 都...


如何在Spring 3.0中实现Scaffolding

“我正在使用 spring maven 项目,想要在其中实现脚手架,以便我可以根据模型动态生成 DAO、服务和 spring 表单。如何实现?”


Django-channels 实例关闭时间过长而被杀死

谁能告诉我可能是什么问题? 警告应用程序实例 谁能告诉我可能是什么问题? 警告应用程序实例 wait_for=> 连接 关闭时间过长并被终止。 我的阿斯吉 "^subscription", channels_jwt_middleware(MyConsumer.as_asgi(schema=schema)) ) application = ProtocolTypeRouter({ "http": django_asgi_app, "websocket": QueryAuthMiddleware( URLRouter([ subscription_url, ]) ), })``` my custom MyConsumer ```class MyConsumer(GraphQLWSConsumer): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.profile_id = None async def __call__(self, scope, receive, send): user = scope.get("user", None) time_zone = await get_current_timezone(user) self.profile_id = scope.get("active_profile_id", None) self.timezone = time_zone if time_zone else settings.TIME_ZONE await super().__call__(scope, receive, send) async def connect(self): await super().connect() await change_status(True, self.profile_id) async def disconnect(self, close_code, *args, **kwargs): await super().disconnect(close_code) await change_status(False, self.profile_id)``` 解决我的问题 daphne -b 0.0.0.0 -p $SERVER_PORT --application-close-timeout 60 --proxy-headers server.asgi:application


使用 async/await 获取 firebase.auth().currentUser

我成功使用 onAuthStateChange 观察者检查用户的身份验证状态并将用户重定向到仪表板页面(react-native 项目)。然而,在仪表板上我已经想展示一些......


Spring Boot 集成测试抛出错误“java.lang.IllegalStateException:阻塞读取超时 5000 毫秒”

问题发生在我通过 Spring boot 2.0.0.M3 使用 Spring webflux 的项目上。以下是项目的依赖项, 依赖项{ 编译 'org.springframework.boot:spring-boot-starter-


React 应用程序如何连接到 OAuth 2 Spring 授权服务器/资源服务器/oauth 客户端后端

我已经实现了一个生成令牌的 OAuth 2 spring 授权服务器。端口4002 用于 api 调用的 spring 资源服务器。端口4003 一个 spring oauth 客户端,用于处理与


使用 OCaml Async 进行并发写入

我正在从网络读取数据,我想在收到数据时将其写入文件。写入是并发且非顺序的(想想 P2P 文件共享)。在 C 中,我会得到一个文件描述符......


Spring Boot JSP 404.Whitelabel 错误页面

无法使用 spring-boot 加载非常简单的 JSP 页面,出现 404 Not Found HmisApplication.class @SpringBootApplication 公共类 HmisApplication 扩展 SpringBootServletInitializer { @覆盖


通过 Maven Spring Boot 插件运行应用程序时如何设置 Java Xmx 标志?

我正在使用 mvn spring-boot:run 运行应用程序。我正在尝试按照此处所述设置 Xmx 标志: mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xmx512m" 但它不...


在 Spring-MVC 中显示 JSP 页面时出现问题

我在 Spring-MVC 中显示 jsp 页面时遇到问题。 这是带有 Gradle 和 IntelliJ CE 的基本 hello world Spring-MVC: 我收到以下错误页面: 这是我的 build.gradle: 构建脚本{


错误无法正确处理并导致我的应用程序崩溃

所以我使用express-async-handler来处理异步函数,它应该在抛出错误后自动添加next(),但由于某种原因它看起来没有。 这是我的功能


如何使用 Java 17、Spring 6、Jakarta Server Faces 4.x 和 PrimeFaces 12 检索 FacesContext?

我正在尝试将我的 JSF + PrimeFaces (UI) + Spring 应用程序从 Java 8 迁移到 Java 17,同时还将 Spring 版本迁移到 6。 为此,需要从 javax 库移出...


Java Spring Boot:异常处理

Java Spring Boot 风格的 Web 服务有点新鲜——所以请保持温柔。为什么大多数 Spring Boot 控制器示例没有显示捕获任何异常?我看到我的一些同伴正在开发...


用于等待两个 async let 返回类型 void 的简洁语法

Swift 中的两个异步函数应该同时启动,然后在某个时刻等待。我已经找到了一个解决方案,但我对语法并不是 100% 满意。我想写


如何在React Native Vision Camera中更改照片的宽度和高度或裁剪它?

我只是想获得一个方形图像并尽可能减小图像的尺寸,同时保持图像文本清晰。 这是我的尝试,但它不起作用。 const capturePhoto = async () =>...


Springboot 3.2.1(使用 Jetty)和 graphql-spqr-spring-boot-starter 1.0.0 出现错误

刚刚将 Spring Boot 升级到版本 3.2.1(使用 Jetty)并开始出现以下错误。知道如何解决这个问题吗?或者 graphql-spqr-spring-boot-starter:1.0.0 仅与旧版本兼容...


Spring找不到指定的Bean

我有一个 Spring 应用程序,它使用 JpaRepository 连接到 h2,但出现以下错误: com.julio.demo.DemoApplication 中的字段 usuarioRepository 需要类型为 'com....


本地运行测试时如何禁用 Spring Cloud Google Secret Manager 4.x+?

我们使用的是 spring boot 3.2,我们正在尝试将 spring-cloud-gcp-starter-secretmanager 从版本 3.2.1 升级到 4.9.0。当我们这样做时,我们的集成测试会失败,并显示: java.lang.


Spring Security 6 POST 请求未经permitAll()授权

我正在使用 Spring Boot 3、Spring Security 6。我的安全配置无法正常工作。我有 2 条路径,任何请求都应该被允许,而对于其他所有请求,都需要进行身份验证...


Apache Tiles 3.x 不再在 Spring 6.x 中编译,因为 javax.* 重命名为 jakarta。*

我的应用程序使用Spring 5.x,Apache Tiles 3.0.x。现在我想迁移到 Spring 6.x,但问题出在 Apache Tiles 3.0.x 上,因为它有 javax.servlet.* 而不是 jakarta.* 。所有春天...


Spring security 6.2 JSESSIONID 未返回

我正在使用 Kotlin 创建一个 Spring Boot 应用程序。我已经将 WebSecurity 配置为: @配置 类安全配置{ @Autowired Lateinit var dataSource: 数据源 @值(...


Vue3 的 onMounted 钩子中带有异步的 Pinia 方法未同步执行 - 我错过了什么?

我在 onMounted 钩子中使用了 async 和 pinia 方法,不会同步执行代码。 当我尝试查看 {{ store }} 时,它不显示任何内容。请让我知道出了什么问题。比...


在 Spring Boot 3.2.0 中使用 JdbcTemplate 将 Java LocalDate 持久化到 Oracle DATE 列时出现意外的时间组件插入

在 Spring Boot 3.2.0 中使用 JdbcTemplate 将 Java LocalDate 值保留在 Oracle DATE 列中时,我们遇到了意外行为。 在升级到 Spring Boot 3.2.0 之前,时间


使用 Hibernate - Oracle DB 在 Spring Boot 2.3.5 版本中设置 JPA 方法的超时

我正在使用 Spring Boot 2.3.5 版本和 Oracle 12c DB,并使用 Spring Boot 数据 jpa/hibernate 执行数据库操作。 有时数据库操作需要更多时间,我需要设置时间...


为什么我有很多对 API 的请求,需要在 next.js 13v 的服务器端获取数据

我使用 Next.js 13v 在服务器端获取数据。 我的组件 const 页脚 = async () => { // 获取数据 const allCategories = (await getAllCategories({})).data; 返回 我使用 Next.js 13v 在服务器端获取数据。 我的组件 const Footer = async () => { // Get data const allCategories = (await getAllCategories({})).data; return <footer className={styles.footer}></footer>; }; 我的功能 export const getAllCategories = async ( params: IGetAllCategoriesRequest, ): Promise<AxiosResponse<IGetAllCategoriesResponse>> => { const url = 'static-pages/category/public'; const response = await axiosInstance.get<IGetAllCategoriesResponse>( url, { params: params, }, ); return response; }; 如果请求成功,我有一个请求 但是如果出现错误,我有很多请求,然后重定向到错误页面 本机获取具有相同的行为 那么为什么我在 next.js 13v 中对 API 有很多请求并在服务器端获取数据? 可能和开发模式有关。我发现这篇文章可能与此行为有关:https://dev.to/noclat/fixing-too-many-connections-errors-with-database-clients-stacking-in-dev-mode-with-next -js-3kpm


获取“解析期间的 Http 失败” - 尝试模仿缓慢的 API 以显示 Async-Await 的重要性

我使用虚拟 API 来演示 Asyn-await 在处理延迟的服务器响应时的重要性。简单的事情是,如果我对这个 URL (https://hub.dummyapis.com/delay?seconds=3) 进行 get 调用,我...


如何限制Spring Batch作业的多个实例运行?

我的 Spring 批处理由 Rest 端点触发。我正在寻找一次仅运行一个作业实例的解决方案。


Kotlin maven 插件忽略 jvmTarget

Spring Boot:3.2.0,Kotlin:1.9.21,构建映像:maven:3.9.5-amazoncorretto-21,运行映像:amazoncorretto:17 我有一个非常简单的 Spring Boot 项目 @SpringBootApplication 类演示应用程序 有趣


Spring Boot Keycloak docker-compose

当 Docker 容器中的 Spring Boot 应用程序尝试访问 Keycloak Docker 容器时,我遇到问题。我使用 docker-compose 创建了它们。以下是文件: 版本:“3.8”


如何使用spring security 6为AuthenticationManager的参数2定义bean?

我是 Spring Security 6 的新手。当我尝试配置安全性时,出现此错误: ************************** 应用程序无法启动 ************************** 描述:


如何使用 twitch 机器人让某人超时(client.timeout 和 client.say(channel, `/timeout @${tags.username} 不起作用)?

我无法使用 Twitch 聊天机器人禁止或超时在 js 中编写某些单词的用户。但是,我可以使用机器人发送消息。 我的代码: client.on('消息', async (频道, 标签, 消息, self) =>...


将 localstack 与 Spring Cloud AWS 2.3 一起使用时出现未知主机

“ResourceLoader”与 AWS S3 可以很好地处理这些属性: 云: 亚马逊: s3: 端点:s3.amazonaws.com <-- custom endpoint added in spring cloud aws 2.3 creden...


我的控制器中所有 @FXML 属性均为 NULL(SPRING BOOT - JAVA-FX 集成)

我正在开发一个会员管理软件,我使用的是spring boot,spring data与JAVA-FX集成。 一切都很好,直到我创建了一个视图,其中有一张包含所有拥护成员的表格


Spring 5 中机密客户的 PKCE(非反应式)

我正在尝试在 Spring Boot 5 中的 oAuth 客户端上启用 PKCE。我能找到的示例适用于反应式客户端,如下所示: SecurityWebFilterChain springSecurityFilterChain(


当其中一个属性是通过 API 调用获得的另外两个属性计算出来时,如何填充模型属性?

[已解决] 我没有将反向地理代码视为异步函数,从而导致计时问题和数据无法正确填充。使用 async wait 解决了这个问题。 解决方案: func getCurrentWeat...


© www.soinside.com 2019 - 2024. All rights reserved.