gpt4 book ai didi

grails - Grails 3 schemaExport包含带有FileNotFoundException的警告,该警告寻找sitemesh.xml

转载 作者:行者123 更新时间:2023-12-02 14:06:03 25 4
gpt4 key购买 nike

当使用Gradle为Grails 3.3应用程序执行 schemaExport 时,尽管已创建 ddl.sql ,但日志中仍显示以下警告。根据Grails 3文档,sitemesh.xml已被删除,因此该文件自然将不可用。我想念什么吗?

工具和版本:Grails 3.3.0,Gradle 3.3,Hibnerate 5,Sybase ASE 15.7

2017-09-13 12:50:45.264  WARN --- [           main] o.s.mock.web.MockServletContext          : Couldn't determine real path of resource class path resource [src/main/webapp/WEB-INF/sitemesh.xml]

java.io.FileNotFoundException: class path resource [src/main/webapp/WEB-INF/sitemesh.xml] cannot be resolved to URL because it does not exist
at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)
at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:49)
at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:458)
at org.grails.web.sitemesh.Grails5535Factory.<init>(Grails5535Factory.java:78)
at org.grails.web.servlet.view.SitemeshLayoutViewResolver.loadSitemeshConfig(SitemeshLayoutViewResolver.java:105)
at org.grails.web.servlet.view.SitemeshLayoutViewResolver.init(SitemeshLayoutViewResolver.java:67)
at org.grails.web.servlet.view.SitemeshLayoutViewResolver.onApplicationEvent(SitemeshLayoutViewResolver.java:146)
at org.grails.web.servlet.view.SitemeshLayoutViewResolver.onApplicationEvent(SitemeshLayoutViewResolver.java:42)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at grails.boot.GrailsApp.run(GrailsApp.groovy:83)
at grails.ui.command.GrailsApplicationContextCommandRunner.run(GrailsApplicationContextCommandRunner.groovy:55)
at grails.ui.command.GrailsApplicationContextCommandRunner.main(GrailsApplicationContextCommandRunner.groovy:102)

最佳答案

这只是警告消息。潜在的 Spring 类(class)正在寻找它,只是说它不存在。缺省情况下,日志级别不显示此输出。

您可以放心地忽略该消息,或调整记录器以不显示它。

https://github.com/spring-projects/spring-framework/blob/master/spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java#L460

关于grails - Grails 3 schemaExport包含带有FileNotFoundException的警告,该警告寻找sitemesh.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46189472/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com