3
MethodDispatcher
CherryPy
은 여러 개의 URL 경로를 처리합니까? 나는 아래처럼 뭔가하려고 노력하고 있지만, /customers
에 대한 요청은 잘 작동하지만, /orders
에 대한 요청은 항상 '404 Nothing given URI'와 일치합니다.여러 URL 경로가있는 CherryPy MethodDispatcher
class Customers(object):
exposed = True
def GET(self):
return getCustomers()
class Orders(object):
exposed = True
def GET(self):
return getOrders()
class Root(object):
pass
root = Root()
root.customers = Customers()
root.orders = Orders()
conf = {
'global': {
'server.socket_host': '0.0.0.0',
'server.socket_port': 8000,
},
'/': {
'request.dispatch': cherrypy.dispatch.MethodDispatcher(),
},
}
cherrypy.quickstart(root, '/', conf)
안녕하세요,이 문제를 해결 했습니까? 나는 정확히 똑같은 문제에 부딪쳤다 ... – martin
나는 그것이 사용하고있는 CherryPy 버전의 버그라고 생각한다. 다른 컴퓨터에서 재생할 수 없기 때문에 환경을 청소하고 모든 것을 다시 설치 했으므로 문제가 해결되었습니다. – highlycaffeinated