-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
代码修改 => 1.去除SpringGetter类,将ApplicationContext放入Vessel中管理,修改Vessel相关部分…
…代码 2.默认不扫描Common包
- Loading branch information
Showing
4 changed files
with
49 additions
and
45 deletions.
There are no files selected for viewing
18 changes: 13 additions & 5 deletions
18
common/src/main/java/com/toocol/common/BasisInitAfter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
package com.toocol.common; | ||
|
||
import com.toocol.common.utils.SpringGetter; | ||
import com.toocol.common.vessel.AbstractVessel; | ||
import lombok.AllArgsConstructor; | ||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* @author Joezeo | ||
* @date 2021/8/1 0:28 | ||
*/ | ||
@Component | ||
public class BasisInitAfter implements CommandLineRunner { | ||
@AllArgsConstructor | ||
public abstract class BasisInitAfter implements CommandLineRunner { | ||
|
||
public final AbstractVessel vessel; | ||
|
||
@Override | ||
public void run(String... args) throws Exception { | ||
SpringGetter.getBean(AbstractVessel.class).ifPresent(AbstractVessel::init); | ||
vessel.init(); | ||
init(); | ||
} | ||
|
||
/** | ||
* initial the server | ||
*/ | ||
public abstract void init(); | ||
} |
35 changes: 0 additions & 35 deletions
35
common/src/main/java/com/toocol/common/utils/SpringGetter.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters