Fixed typo and reduced warnings.
This commit is contained in:
@@ -5,12 +5,10 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static de.htwsaar.webshop.config.ControllerPathConfig.ERROR;
|
||||
import static de.htwsaar.webshop.util.LoggerUtil.logRequest;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@Repository
|
||||
@SuppressWarnings("unused")
|
||||
public interface ArticleRepository extends JpaRepository<Article, Long> {
|
||||
Optional<Article> findArticleById(@NonNull Long id);
|
||||
Optional<Article> findArticleByName(@NonNull String Name);
|
||||
|
||||
@@ -6,7 +6,6 @@ import jakarta.validation.constraints.Positive;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Repository
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@@ -45,6 +44,6 @@ public class Article {
|
||||
@Column(name = "discount100", nullable = false)
|
||||
private Integer discount100;
|
||||
|
||||
@Column(name = "catefory", nullable = false)
|
||||
@Column(name = "category", nullable = false)
|
||||
private String category;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package de.htwsaar.webshop.repository.entities;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package de.htwsaar.webshop.repository.entities;
|
||||
|
||||
import jakarta.annotation.Nullable;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -5,6 +5,7 @@ import de.htwsaar.webshop.repository.entities.Article;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface ArticleService {
|
||||
List<Article> findAll();
|
||||
Article findByUUID(UUID uuid);
|
||||
|
||||
@@ -4,6 +4,7 @@ import de.htwsaar.webshop.repository.entities.Image;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface ImageService {
|
||||
List<Image> getImageByItemId(Long itemId);
|
||||
Image getImageByArticleId(Long imageId);
|
||||
|
||||
Reference in New Issue
Block a user