commit method
Implementation
@override
void commit(Spanner spanner) {
if (_middleware != null) {
spanner.addMiddleware<Middleware>(path, _middleware!);
} else if (_requestHandler != null) {
spanner.addRoute<Middleware>(method, path, _requestHandler!);
}
}