All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.herodotus.engine.data.tenant.repository.SysTenantDataSourceRepository Maven / Gradle / Ivy

/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2020-2030 郑庚伟 ZHENGGENGWEI (码匠君),  Licensed under the AGPL License
 *
 * This file is part of Herodotus Engine.
 *
 * Herodotus Engine is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Herodotus Engine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see .
 */

package cn.herodotus.engine.data.tenant.repository;

import cn.herodotus.engine.data.core.repository.BaseRepository;
import cn.herodotus.engine.data.tenant.entity.SysTenantDataSource;
import jakarta.persistence.QueryHint;
import org.hibernate.jpa.AvailableHints;
import org.springframework.data.jpa.repository.QueryHints;

/**
 * 

Description: 多租户数据源 Repository

* * @author : gengwei.zheng * @date : 2023/3/28 21:58 */ public interface SysTenantDataSourceRepository extends BaseRepository { /** * 根据租户ID查询数据源 * * @param tenantId 租户ID * @return {@link SysTenantDataSource} */ @QueryHints(@QueryHint(name = AvailableHints.HINT_CACHEABLE, value = "true")) SysTenantDataSource findByTenantId(String tenantId); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy