added back web boot, added base controller
This commit is contained in:
parent
e0921074fa
commit
c6a3ca9318
7
pom.xml
7
pom.xml
|
@ -18,13 +18,15 @@
|
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>17</java.version>
|
||||
<spring.version>6.0.11</spring.version>
|
||||
<!-- <spring.version>5.3.2</spring.version> -->
|
||||
<hibernate.version>6.3.1.Final</hibernate.version>
|
||||
<!-- <hibernate.version>5.6.9.Final</hibernate.version> -->
|
||||
<sqlite-jdbc.version>3.30.1</sqlite-jdbc.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
|
@ -46,6 +48,7 @@
|
|||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.itdominator.api.controller;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.itdominator.api.dto.ThumbnailDto;
|
||||
import com.itdominator.api.dto.ThumbnailSearchCriteria;
|
||||
import com.itdominator.api.services.ThumbnailerService;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@Validated
|
||||
public class BaseController {
|
||||
|
||||
|
||||
@PreAuthorize("hashPermission('User')")
|
||||
@GetMapping("/")
|
||||
public String root() {
|
||||
return "<h1>Hello, World!</h1>";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue