https://github.com/clarin-eric/linkchecker-persistence
https://github.com/clarin-eric/linkchecker-persistence
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/clarin-eric/linkchecker-persistence
- Owner: clarin-eric
- License: gpl-3.0
- Created: 2022-03-30T07:22:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-22T15:33:30.000Z (3 months ago)
- Last Synced: 2026-03-31T16:36:15.208Z (2 months ago)
- Language: Java
- Size: 469 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# Linkchecker Persistence API
## Introduction
The linkchecker persistence API (LPA) is a project, based on [Spring data JPA 2.7.10](https://spring.io/projects/spring-data-jpa), which serves as a common persistence layer for the following projects:
- [Clarin Curation Dashboard](https://github.com/clarin-eric/curation-dashboard)
- [Link Checker](https://github.com/clarin-eric/linkchecker)
- [Link Checker API](https://github.com/clarin-eric/linkchecker-api)
- [Virtual Language Observatory](https://github.com/clarin-eric/VLO)
## Set up
When you load LPA as a dependency into your Spring boot parent project, you have to specify a database connection there.
A typical entry in the application.yml of your project would look like this:
```
spring:
datasource:
url: jdbc:mariadb://:3306/
username:
password:
driver-class-name:
jpa:
hibernate:
ddl-auto: none
```
Spring data JPA uses the Hikari connection pool by default. Hikari specific properties can be set by:
```
spring:
datasource:
hikari:
:
```
For details on Hikari properties, have a look on the [Hikari Readme page](https://github.com/brettwooldridge/HikariCP#frequently-used), please.
## Important notes
- linkchecker-persistence is using a schema.sql file to set up database structure with tables and views. The SQL script works for H2 and MariaDB and we strongly discourage an automatic setup via hibernate.ddl-auto=create.
- version 0.0.6+ uses the hibernate-enhance-maven-plugin to allow lazy fetching for toOne associations. This is basically important when you lookup a significant number of Url instances
since otherwise for each instance a query is send to the database to look up the associated Status instance. **If you use another persistence API than hibernate, which is currently
the default in Spring data JPA, you should make sure lazy loading for toOne associations.**