| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?php
- return [
- 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
- 'components' => [
- 'request' => [
- 'cookieValidationKey' => '3i18DOM7ZDqqQfr2S0hj0c60wFxxTb3J',
- ],
- 'cache' => [
- 'class' => 'yii\caching\FileCache',
- ],
- 'db' => [
- 'class' => 'yii\db\Connection',
- 'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
- 'username' => 'root',
- 'password' => 'zt20152008',
- 'charset' => 'utf8',
- ],
- 'redis' => [
- 'class' => 'yii\redis\Connection',
- 'hostname' => '127.0.0.1',
- 'port' => 6379,
- 'database' => 0,
- 'password' => 'byt6gc1w0aed2q7h',
- ],
- //redis发布与订阅
- 'redisPubSub' => [
- 'class' => 'hollisho\redis_pub_sub\RedisPubSub',
- 'connect' => [
- 'class' => 'yii\redis\Connection',
- 'hostname' => '127.0.0.1',
- 'port' => 6379,
- 'database' => 0,
- 'password' => 'byt6gc1w0aed2q7h',
- 'connectionTimeout' => 20,
- ]
- ],
- 'dict' => [
- 'class' => 'common\components\configDict',
- ],
- 'rabbitmq' => [
- 'class' => 'mikemadisonweb\rabbitmq\Configuration',
- 'connections' => [
- [
- 'host' => '127.0.0.1',
- 'port' => '5672',
- 'user' => 'admin',
- 'password' => 'vn3oaz1i8w32k4mm9',
- 'vhost' => '/',
- ]
- ],
- 'exchanges' => [
- [
- 'name' => 'ex1',
- 'type' => 'direct'
- ],
- ],
- 'queues' => [
- [
- 'name' => 'queues1',
- 'passive' => false,
- ],
- [
- 'name' => 'queues2',
- 'passive' => false,
- ],
- ],
- 'bindings' => [
- [
- 'queue' => 'queues1',
- 'exchange' => 'ex1',
- 'routing_keys' => ['route1'],
- ],
- ],
- 'producers' => [
- [
- 'name' => 'producers',
- ],
- ],
- 'consumers' => [
- [
- 'name' => 'consumers',
- 'callbacks' => [
- 'queues1' => '\common\components\rabbitmq\ImportDataConsumer',
- ],
- ],
- ],
- ],
- 'mailer' => [
- 'class' => 'yii\swiftmailer\Mailer',
- 'useFileTransport' => false,
- 'transport' => [
- 'class' => 'Swift_SmtpTransport',
- 'host' => 'smtp.126.com',
- 'username' => 'zhhinc@126.com',
- 'password' => '',
- 'port' => '25',
- 'encryption' => 'tls',
- ],
- 'messageConfig' => [
- 'charset' => 'UTF-8',
- 'from' => ['zhhinc@126.com' => '系统邮件']
- ],
- ],
- ],
- ];
|