REST API идентификатор в URL - PullRequest
2 голосов
/ 19 июня 2019

Я хочу создать точку на localhost/rest/customers/{id here} Вот что у меня есть:

<cfcomponent rest="true" restpath="/licenses">
   <cffunction name="getCustomerByID" access="remote" 
           httpMethod="GET" restpath="/{customerID}">

       <cfargument name="customerID" required="true" 
           restargsource="Path" type="numeric" default=-1/>

       <cfreturn customerID>
   </cffunction>
</cfcomponent>

Но я получаю эту ошибку:

Произошла ошибкапри разрешении CFC: файл: / C: /ColdFusion2018/cfusion/wwwroot/customers.cfc.Убедитесь, что нет ошибок компиляции с CFC с поддержкой REST.

...