试了好多方法都没成功,下面方法绝对能成功设置 在框架里面有源码,在/vendor/yiisoft/yii2/web/Application.php的第34行找到了: class Application extends \yii\base\Application { /** * @var string the default route of this application. Defaults to 'site'. */ public $defaultRoute = 'site'; 然而我们最好
frontend->config->main-local.php $config = [ 'defaultRoute' => 'index/index',//修改默认访问控制器 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation /*___*/ 'enableCo
1.修改默认添加用户权限为User,而非Powers User: 在/portal-master/portal-impl/src/portal.properties文件中有如下配置: # # Input a list of default role names separated by \n characters that are # associated with newly created users. # admin.default.role.names=Power User\nUser