我正在尝试使映射起作用

 ...
 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();
...
}



无效的组件定义,在以下位置找不到models.ccfro
railo.runtime.component.ComponentLoader.load(ComponentLoader.java:276):276

railo.runtime.component.ComponentLoader.loadComponent(ComponentLoader.java:39):39

railo.runtime.PageContextImpl.loadComponent(PageContextImpl.java:2784):2784

railo.runtime.functions.other.CreateObject.doComponent(CreateObject.java:178):178

railo.runtime.functions.other._CreateComponent.call(_CreateComponent.java:21):21

scorecard38.application_cfc $ cf.udfCall(D:\ railo \ webapps \ www \ Scorecard38 \ Application.cfc:55):55
在railo.runtime.type.UDFImpl.implementation(UDFImpl.java:94):94处


注意:ACF没有此问题

最佳答案

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

10-07 23:53