在Railo中找不到具有映射的CFC

Jam*_*ler 4 coldfusion railo application.cfc cfml

我试图让映射工作

 ...
 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();
...
}
Run Code Online (Sandbox Code Playgroud)

无效的组件定义,无法在railo.runtime.component.ComponentLoader.load(ComponentLoader.java:276)上找到models.ccfro: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没有此问题

Jam*_*ler 5

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