[fix][headless]Fix a set of known issues.
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

This commit is contained in:
jerryjzhang
2025-01-14 14:47:35 +08:00
parent 329756056c
commit 2b28aeea6f
10 changed files with 44 additions and 25 deletions

View File

@@ -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);

View File

@@ -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:

View File

@@ -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

View File

@@ -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