Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何指定多个模式';Mysql在Spring Boot应用中的应用?_Java_Mysql_Spring_Spring Boot - Fatal编程技术网

Java 如何指定多个模式';Mysql在Spring Boot应用中的应用?

Java 如何指定多个模式';Mysql在Spring Boot应用中的应用?,java,mysql,spring,spring-boot,Java,Mysql,Spring,Spring Boot,我正在mysql中为spring boot应用程序使用两个模式。如果我使用单一模式,我可以指定模式名称,如下所述 # = DATA SOURCE # =============================== # Set here configurations for the database connection spring.datasource.url=jdbc:mysql://localhost:3306/holmes_kyc_config spring.datasource.use

我正在mysql中为spring boot应用程序使用两个模式。如果我使用单一模式,我可以指定模式名称,如下所述

# = DATA SOURCE
# ===============================
# Set here configurations for the database connection
spring.datasource.url=jdbc:mysql://localhost:3306/holmes_kyc_config
spring.datasource.username=root
spring.datasource.password=root123
spring.datasource.driver-class-name=com.mysql.jdbc.Drive
现在我使用了两个schema,所以我尝试在bean类it self中给出schema名称,而不是像下面那样给出application.properties

这是一个Bean类@Entity@Table(name=“user\u auth”,schema=“holmes\u kyc\u config”)公共类用户身份验证{

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "iduser_auth")
private Integer iduser_auth;
这是第二个Bean类:

@Entity
@Table(name = "user_auth",schema = "kyc_user_schema")
public class PhaseStatus implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "idnew_table")
    private Integer idnew_table;

因此,请您指导我给出两个模式的正确方法。

请解释您尝试时遇到的问题。@davidxxx出现类似“java.sql.SQLException:未选择数据库”的错误