He intentado crear una interface y necesito heredar de Spring Boot el data Repository. Pero, al importar el paquete org.springframework.data.repository, me dice que no existe.
Aquí mi código
package com.aureoStock.ejemplo1;
import java.io.Serializable;
import org.springframework.data.repository.Repository;
public interface PersonaRepositorio extends Repository<Persona, int>{
}
Aquí mi archivo pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.aureoStock</groupId>
<artifactId>ejemplo1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>ejemplo1</name>
<description>CRUD ANGULAR + MYSQL + SPRING BOOT</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
También tuve un problema con el paquete javax, pero este lo corregí colocando la dependencia en pom.xml. Pero en este caso, no sé cómo resolver este problema.