Skip to content

Commit

Permalink
hotfix:fix boot bug
Browse files Browse the repository at this point in the history
  • Loading branch information
陆云峰 committed Jun 7, 2021
1 parent d268acf commit 9567228
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/AopClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public function proxyFile(): void
foreach ($files as $file) {
// 实例化代理
$proxy = new Proxy([$classVisitor = new ClassVisitor(), new MethodVisitor()]);
$proxyFile = sprintf('%s' . DIRECTORY_SEPARATOR . '%s', $storagePath, $file->getFilename());
// 代理类将源代码生成代理后代码(在生成代理代码的过程中,源文件相关信息会被存储在访客节点类中)
$this->classMap[$classVisitor->getClass()] = $proxy->generateProxyFile(
$proxyFile = $proxy->generateProxyFile(
$file->getContents(),
$proxyFile
sprintf('%s' . DIRECTORY_SEPARATOR . '%s', $storagePath, $file->getFilename())
);
// 代理类将源代码生成代理后代码(在生成代理代码的过程中,源文件相关信息会被存储在访客节点类中)
$this->classMap[$classVisitor->getClass()] = $proxyFile;
// 判断当前扫描结果,如果是Aspect注解,那就进行注册
if ($classVisitor->isAspect()) {
Aop::register($classVisitor->getClass());
Expand Down

0 comments on commit 9567228

Please sign in to comment.