mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-20 06:34:55 +00:00
[fix][headless]Fix a set of known issues.
This commit is contained in:
@@ -98,6 +98,9 @@ public abstract class S2BaseDemo implements CommandLineRunner {
|
||||
@Value("${s2.demo.names:S2VisitsDemo}")
|
||||
protected List<String> demoList;
|
||||
|
||||
@Value("${spring.datasource.driver-class-name}")
|
||||
protected String driverClassName;
|
||||
|
||||
public void run(String... args) {
|
||||
demoDatabase = addDatabaseIfNotExist();
|
||||
demoChatModel = addChatModelIfNotExist();
|
||||
@@ -122,10 +125,10 @@ public abstract class S2BaseDemo implements CommandLineRunner {
|
||||
databaseReq.setName("S2数据库DEMO");
|
||||
databaseReq.setDescription("样例数据库实例仅用于体验");
|
||||
databaseReq.setType(DataType.H2.getFeature());
|
||||
String profile = System.getProperty("spring.profiles.active");
|
||||
if ("postgres".equalsIgnoreCase(profile)) {
|
||||
if ("org.postgresql.Driver".equals(driverClassName)) {
|
||||
databaseReq.setType(DataType.POSTGRESQL.getFeature());
|
||||
} else if ("mysql".equalsIgnoreCase(profile)) {
|
||||
} else if ("com.mysql.cj.jdbc.Driver".equals(driverClassName)
|
||||
|| "com.mysql.jdbc.Driver".equals(driverClassName)) {
|
||||
databaseReq.setType(DataType.MYSQL.getFeature());
|
||||
}
|
||||
databaseReq.setUrl(url);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password:
|
||||
|
||||
@@ -6,21 +6,20 @@ spring:
|
||||
password: postgres
|
||||
sql:
|
||||
init:
|
||||
enabled: false
|
||||
mode: always
|
||||
mode: never
|
||||
username: postgres
|
||||
password: postgres
|
||||
schema-locations: classpath:db/schema-postgres.sql,classpath:db/schema-postgres-demo.sql
|
||||
data-locations: classpath:db/data-postgres.sql,classpath:db/data-postgres-demo.sql
|
||||
|
||||
#s2:
|
||||
# embedding:
|
||||
# store:
|
||||
# provider: PGVECTOR
|
||||
# base:
|
||||
# url: 127.0.0.1
|
||||
# port: 5432
|
||||
# databaseName: postgres
|
||||
# user: postgres
|
||||
# password: postgres
|
||||
# dimension: 512
|
||||
s2:
|
||||
embedding:
|
||||
store:
|
||||
provider: PGVECTOR
|
||||
base:
|
||||
url: 127.0.0.1
|
||||
port: 5432
|
||||
databaseName: postgres
|
||||
user: postgres
|
||||
password: postgres
|
||||
dimension: 512
|
||||
@@ -5,13 +5,13 @@ CREATE TABLE IF NOT EXISTS s2_user_department (
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS s2_pv_uv_statis (
|
||||
imp_date varchar(200) NOT NULL,
|
||||
imp_date DATE NOT NULL,
|
||||
user_name varchar(200) NOT NULL,
|
||||
page varchar(200) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS s2_stay_time_statis (
|
||||
imp_date varchar(200) NOT NULL,
|
||||
imp_date DATE NOT NULL,
|
||||
user_name varchar(200) NOT NULL,
|
||||
stay_hours double precision NOT NULL,
|
||||
page varchar(200) NOT NULL
|
||||
|
||||
Reference in New Issue
Block a user