
com.atlassian.connect.spring.AtlassianHostRepository Maven / Gradle / Ivy
package com.atlassian.connect.spring;
import org.springframework.data.repository.CrudRepository;
import java.util.Optional;
/**
* A Spring Data repository for information about Atlassian hosts
* in which the add-on is or has been installed.
*
* NOTE: A component implementing this interface is required for your application to start. Such a
* component is typically obtained by
* including the appropriate {@code @Enable${store}Repositories} annotation.
*
*
Spring Data JPA Support
*
* For using Spring Data JPA, instead of including the
* {@code @EnableJpaRepositories} annotation yourself, include the following dependency on the companion Spring Boot
* starter in your Maven POM, which additionally provides integration with
* Liquibase and enables Spring Data auditing:
*
<dependency>
* <groupId>com.atlassian.connect</groupId>
* <artifactId>atlassian-connect-spring-boot-jpa-starter</artifactId>
* <version>${atlassian-connect-spring-boot.version}</version>
* </dependency>
*
* @since 1.0.0
*/
public interface AtlassianHostRepository extends CrudRepository {
/**
* Returns the host with the given base URL.
*
* @param baseUrl the base URL of the host application
* @return the host with the given base URL or {@link Optional#empty()}
* @see AtlassianHost#getBaseUrl()
*/
Optional findFirstByBaseUrl(String baseUrl);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy