gpt4 book ai didi

coldfusion - 在 Railo 中找不到带映射的 CFC

转载 作者:行者123 更新时间:2023-12-03 16:45:04 29 4
gpt4 key购买 nike

我正在尝试使映射工作

 ...
this.mappings = {
"/toolbox" = ExpandPath(".") & "toolbox",
"/models" = ExpandPath(".") & "controllers/model",
"/model" = ExpandPath(".") & "controllers/model" // hack, plural is correct
};


setupApplication() {
...
// works
application.objCCFRO = new controllers.model.ccfro();
application.objUtil = new controllers.model.utils();

// Does not work
application.objCCFRO = new models.ccfro();
application.objUtil = new models.utils();
...
}

invalid component definition, can't find models.ccfro at railo.runtime.component.ComponentLoader.load(ComponentLoader.java:276):276 at railo.runtime.component.ComponentLoader.loadComponent(ComponentLoader.java:39):39 at railo.runtime.PageContextImpl.loadComponent(PageContextImpl.java:2784):2784 at railo.runtime.functions.other.CreateObject.doComponent(CreateObject.java:178):178 at railo.runtime.functions.other._CreateComponent.call(_CreateComponent.java:21):21 at scorecard38.application_cfc$cf.udfCall(D:\railo\webapps\www\Scorecard38\Application.cfc:55):55 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:94):94



注意:ACF 没有这个问题

最佳答案

您必须确保在更改映射时更改了应用程序名称。

关于coldfusion - 在 Railo 中找不到带映射的 CFC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20645464/

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