42 lines
1.4 KiB
Java
42 lines
1.4 KiB
Java
package com.bao.dating;
|
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
import java.io.BufferedReader;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.InputStreamReader;
|
|
|
|
import java.io.BufferedReader;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.InputStreamReader;
|
|
|
|
@MapperScan("com.bao.dating.mapper")
|
|
@SpringBootApplication
|
|
@EnableScheduling
|
|
public class DatingApplication {
|
|
public static void main(String[] args) {
|
|
SpringApplication.run(DatingApplication.class, args);
|
|
// 读取并打印 ciallo.txt 文件内容
|
|
printCialloFile();
|
|
}
|
|
|
|
/**
|
|
* 读取并打印 ciallo.txt 文件内容
|
|
*/
|
|
private static void printCialloFile() {
|
|
try (InputStream inputStream = DatingApplication.class.getClassLoader().getResourceAsStream("ciallo.txt");
|
|
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
|
|
String line;
|
|
while ((line = reader.readLine()) != null) {
|
|
System.out.println(line);
|
|
}
|
|
} catch (IOException e) {
|
|
System.err.println("读取 ciallo.txt 文件时发生错误: " + e.getMessage());
|
|
}
|
|
}
|
|
} |