This commit is contained in:
2021-03-29 16:27:12 +08:00
parent c1d37ce826
commit 4442397aa9
10 changed files with 25 additions and 16 deletions
-5
View File
@@ -12,11 +12,6 @@ namespace Snowflake\Abstracts;
use Exception;
use JetBrains\PhpStorm\Pure;
use ReflectionException;
use Snowflake\Aop;
use Snowflake\Error\Logger;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
use Swoole\Coroutine;
+3 -1
View File
@@ -10,9 +10,11 @@ declare(strict_types=1);
namespace Snowflake;
use Annotation\Aspect;
use Console\Console;
use Console\ConsoleProviders;
use Database\DatabasesProviders;
use Database\InjectProperty;
use Exception;
use HttpServer\ServerProviders;
use Snowflake\Abstracts\BaseApplication;
@@ -46,7 +48,7 @@ class Application extends BaseApplication
/**
* @throws NotFindClassException
*/
public function init()
#[Aspect(InjectProperty::class)] public function init()
{
$this->import(ConsoleProviders::class);
$this->import(DatabasesProviders::class);
+3 -1
View File
@@ -9,6 +9,8 @@ declare(strict_types=1);
namespace Snowflake\Cache;
use Annotation\Aspect;
use Database\InjectProperty;
use Exception;
use ReflectionException;
use Snowflake\Abstracts\Component;
@@ -36,7 +38,7 @@ class Redis extends Component
/**
* @throws Exception
*/
public function init()
#[Aspect(InjectProperty::class)] public function init()
{
$event = Snowflake::app()->getEvent();
$event->on(Event::SYSTEM_RESOURCE_CLEAN, [$this, 'destroy']);
+3 -1
View File
@@ -3,6 +3,8 @@ declare(strict_types=1);
namespace Snowflake\Jwt;
use Annotation\Aspect;
use Database\InjectProperty;
use Exception;
use HttpServer\Http\HttpHeaders;
use ReflectionException;
@@ -79,7 +81,7 @@ mlAZUEjsoaT9vjvjGTxl3uCm0TX5KTgtSJIt2kA1tYVjQef+/iZTHxY=
/**
* @throws ConfigException
*/
public function init()
#[Aspect(InjectProperty::class)] public function init()
{
if (!Config::has('ssl.public') || !Config::has('ssl.private')) {
return;