-
系统:MacOS 异常信息java.io.FileNotFoundException: class path resource [console/] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:211) ~[spring-core-6.0.9.jar:6.0.9]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ Handler run.halo.app.config.WebFluxConfig$$Lambda$1523/0x0000000801803d70@a405129 [DispatcherHandler]
*__checkpoint ⇢ run.halo.app.console.ConsoleProxyFilter [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 ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
*__checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
*__checkpoint ⇢ HTTP GET "/console/node_modules/.vite/deps/@uppy_locales_lib_zh_CN.js.map" [ExceptionHandlingWebHandler] 看起来是这段代码导致的问题run.halo.app.config.WebFluxConfig#consoleIndexRedirection @Bean
RouterFunction<ServerResponse> consoleIndexRedirection() {
var consolePredicate = method(HttpMethod.GET)
.and(path("/console/**").and(path("/console/assets/**").negate()))
.and(accept(MediaType.TEXT_HTML));
return route(consolePredicate, this::serveConsoleIndex);
}
private Mono<ServerResponse> serveConsoleIndex(ServerRequest request) {
var indexLocation = haloProp.getConsole().getLocation() + "index.html";
var indexResource = applicationContext.getResource(indexLocation);
try {
return ServerResponse.ok()
.cacheControl(CacheControl.noStore())
.body(BodyInserters.fromResource(indexResource));
} catch (Throwable e) {
return Mono.error(e);
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
JohnNiang
Jun 15, 2023
Replies: 1 comment 1 reply
-
看起来像是没有构建 console 的问题。可以尝试执行 同时,也可参考开发文档:https://docs.halo.run/developer-guide/core/run。 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
guqing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看起来像是没有构建 console 的问题。可以尝试执行
make -C console build
后,再启动 Halo。同时,也可参考开发文档:https://docs.halo.run/developer-guide/core/run。