Task:
Implement a Spring Data JPA-based persistence layer in /app that enables searching Todo entries by a term contained in their title.
Requirements:
Create a JPA entity Todo mapped to the database table todo_entries with fields:
id: Long (primary key)
title: String
Create a repository interface TodoRepository that:
Extends JpaRepository<Todo, Long>
Exposes a method List findBySearchTerm(String term)
Implements findBySearchTerm using a JPQL query that performs a case-insensitive contains search on the title, e.g. WHERE LOWER(t.title) LIKE LOWER(CONCAT('%', :term, '%'))
Provide a Spring configuration PersistenceContext that:
Enables Spring Data JPA repositories in the appropriate package
Configures a simple in-memory H2 data source
Sets up LocalContainerEntityManagerFactoryBean with Hibernate as the JPA provider
Configures a JpaTransactionManager
Uses hibernate.hbm2ddl.auto = create-drop and hibernate.dialect suitable for H2
Ensure the test infrastructure can load a DbUnit dataset via @DatabaseSetup
Place the dataset file at /app/src/test/resources/todo-entries.xml
The dataset should insert two rows into the todo_entries table:
id=1, title="Initial ITL Task"
id=2, title="Another Task"
Behavior that must be satisfied by tests:
When repository.findBySearchTerm("iTl") is called, it returns exactly one Todo
The returned Todo has id equal to 1 (the first dataset row)
Do not modify the provided tests; ensure all code is placed under /app/ with appropriate package names and imports.