根据文档生成的put请求 https://docs.halo.run/developer-guide/plugin/examples/todolist
在执行的时候报错,看了一下控制台输出PUT不应该执行的是update方法吗?
[f0df13c1-5876] Resolved [DuplicateKeyException: executeMany; SQL [INSERT INTO extensions (name, data, version) VALUES (?, ?, ?)]; Duplicate entry '/registry/hct.plugin.halo.run/hcts/password' for key 'extensions.PRIMARY'] for HTTP PUT /apis/hct.plugin.halo.run/v1alpha1/hcts/password
2023-11-13T14:43:54.924+08:00 ERROR 14928 --- [actor-tcp-nio-8] a.w.r.e.AbstractErrorWebExceptionHandler : [f0df13c1-5876] 500 Server Error for HTTP PUT "/apis/hct.plugin.halo.run/v1alpha1/hcts/password"
org.springframework.dao.DuplicateKeyException: executeMany; SQL [INSERT INTO extensions (name, data, version) VALUES (?, ?, ?)]; Duplicate entry '/registry/hct.plugin.halo.run/hcts/password' for key 'extensions.PRIMARY'
at org.springframework.r2dbc.connection.ConnectionFactoryUtils.convertR2dbcException(ConnectionFactoryUtils.java:235) ~[spring-r2dbc-6.0.13.jar:6.0.13]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*checkpoint ⇢ run.halo.app.console.ProxyFilter [DefaultWebFilterChain]
*checkpoint ⇢ run.halo.app.console.ProxyFilter [DefaultWebFilterChain]
*checkpoint ⇢ run.halo.app.security.InitializeRedirectionWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordLogoutHandler [DefaultWebFilterChain]
*checkpoint ⇢ run.halo.app.security.authentication.login.DelegatingLogoutPageGeneratingWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordAuthenticator [DefaultWebFilterChain]
*checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ AnonymousAuthenticationWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ OrderedWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
*checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
*__checkpoint ⇢ HTTP PUT "/apis/hct.plugin.halo.run/v1alpha1/hcts/password" [ExceptionHandlingWebHandler]