Skip to content

Commit dcfa637

Browse files
committed
调整路由初始化位置
1 parent d365d1c commit dcfa637

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/think/Route.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ public function __construct(App $app)
167167
}
168168

169169
$this->config = array_merge($this->config, $this->app->config->get('route'));
170+
171+
$this->init();
170172
}
171173

172174
protected function init()
@@ -752,7 +754,6 @@ public function dispatch(Request $request, $withRoute = true)
752754
{
753755
$this->request = $request;
754756
$this->host = $this->request->host(true);
755-
$this->init();
756757

757758
if ($withRoute) {
758759
//加载路由

0 commit comments

Comments
 (0)