mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-19 17:03:46 +08:00
remove package
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.zl.mjga.component;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import lombok.Data;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
public class PromptConfiguration {
|
||||
|
||||
@jakarta.annotation.Resource private ResourceLoader resourceLoader;
|
||||
private String system;
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws IOException {
|
||||
Resource resource = resourceLoader.getResource("classpath:prompt.txt");
|
||||
system = Files.readString(Paths.get(resource.getURI()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user