<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
package com.tuempresa.series.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class SeriesController {
@GetMapping("/series")
public String obtenerSeries() {
return "Hola, esta es la ruta /series";
}
}
package com.tuempresa.series;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SeriesApplication {
public static void main(String[] args) {
SpringApplication.run(SeriesApplication.class, args);
}
}
org.springframework.boot spring-boot-starter-webpackage com.tuempresa.series.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class SeriesController {
@GetMapping("/series")
public String obtenerSeries() {
return "Hola, esta es la ruta /series";
}
}