...... } catch (UnsupportedEncodingException exception) { // send internal server error in response } catch (JWTVerificationException exception) { // send invalid token return chain.filter(exchange);

在上述代码中,如果我在catch中捕获到异常,如果我使用下面的代码,能结束掉程序

return Mono.empty();

但是这样返回到是一个空的响应,如果我想结束掉程序并返回一些自定义的响应内容,例如"无效的token”或者"用户名为空"这些错误信息,应该如何写,才能正确返回?

D:\code\python\playground>pip install Cython -U Requirement already satisfied: Cython in c:\users\liu.d.h\appdata\local\programs\python\python311\lib\site-packages (0.29.32) Collecting Cython Downloading Cython-3.0.0-cp311-cp311-win_amd64.whl (2.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 31.2 kB/s eta 0:00:00 Installing collected packages: Cython Attempting uninstall: Cython Found existing installation: Cython 0.29.32 Uninstalling Cython-0.29.32: Successfully uninstalled Cython-0.29.32 Successfully installed Cython-3.0.0 D:\code\python\playground> 直接从 0.29.32 升级到了 3.0.0 https://pypi.org/project/Cython/#history 本来 react + vite 用得好好的,前几天看到几只前端在鼓吹 react + nextjs 合流,说什么 nextjs 也支持 spa。 就试着迁移过去,结果把自己坑得七荤八素,最后组件状态保持直接给我劝退了。 spa 是从 ssr 进化出来,但又和 ssr 完全不同的产物。一小撮前端为了实现 seo 优化,逆向退化出 nextjs。 作为远古人,我需要你们逆向退化吗?是 php 实现不了 ssr 还是 python 实现不了 ssr? 就算 nextjs 比 php 和 python 有优势(如可以和 spa 项目共享一部分界面组件库),也不能把 nextjs 吹得无所不能吧。 这个 nextjs 所谓的 react 的未来,在我看来除了 ssr 简直一无是处。