尝试使用此处描述的Spring数据库自动数据初始化:
https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html
但是,当我执行Maven构建时,会收到错误消息:“错误:从stdin复制失败:JDBC驱动程序当前不支持COPY操作”
Bracerace:
Caused by: org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of URL [file:/Users/ehansen/src/wimg/zuul/target/classes/data-postgresql.sql]: COPY public.zuul_permissions (id, actions, offers, sites) FROM stdin; nested exception is org.postgresql.util.PSQLException: ERROR: COPY from stdin failed: The JDBC driver currently does not support COPY operations.
Where: COPY zuul_permissions, line 1
看来JDBC PostgreSQL驱动程序不支持COPY操作?如果不在Maven构建中,我还应该怎么做呢?
答案 0 :(得分:0)
问题在于用于初始化数据库的数据集。