-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc6f7aa
commit 5b126a3
Showing
5 changed files
with
64 additions
and
30 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...server/chat2db-server-start/src/main/java/ai/chat2db/server/start/config/StdinReader.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//package ai.chat2db.server.start.config; | ||
// | ||
//import jakarta.annotation.PostConstruct; | ||
//import org.springframework.boot.context.event.ApplicationReadyEvent; | ||
//import org.springframework.context.ApplicationListener; | ||
//import org.springframework.stereotype.Component; | ||
// | ||
//import java.util.Scanner; | ||
// | ||
//@Component | ||
//public class StdinReader implements ApplicationListener<ApplicationReadyEvent> { | ||
// | ||
// | ||
// @Override | ||
// public void onApplicationEvent(ApplicationReadyEvent event) { | ||
// // 启动读取 stdin 的线程 | ||
// new Thread(() -> readStdin()).start(); | ||
// } | ||
// | ||
// private void readStdin() { | ||
// Scanner scanner = new Scanner(System.in); | ||
// while (scanner.hasNextLine()) { | ||
// String line = scanner.nextLine(); | ||
// // 处理接收到的数据 | ||
// System.out.println("接收到数据: " + line); | ||
// // 在这里调用其他服务或逻辑 | ||
// } | ||
// } | ||
// | ||
//} |
2 changes: 1 addition & 1 deletion
2
chat2db-server/chat2db-server-start/src/main/resources/application-dev.yml
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
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