Compare commits

...

2 Commits

Author SHA1 Message Date
41931a7f9a lol 2025-05-12 17:34:26 +09:00
76102067ab UrlChanged 2025-05-12 16:20:16 +09:00
8 changed files with 18 additions and 22 deletions

View File

@ -1,5 +1,2 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8

View File

@ -1,7 +1,5 @@
package co.jp.app.common;
import java.util.Objects;
public class ApiResponse<T> {
private boolean success;
private String message;
@ -20,6 +18,7 @@ public class ApiResponse<T> {
public ApiResponse() {
}
public ApiResponse(boolean success, String message, T data) {
this.success = success;
this.message = message;

View File

@ -14,10 +14,10 @@ public class DownloadController {
@Autowired
private PetService service;
@GetMapping("/api/dogs/pet")
@GetMapping("/api/dogs/download")
public String downloadById(@RequestParam List<Integer> id) {
service.getPetByID(id);
return "pet";
return "download";
}
}

View File

@ -1,10 +1,8 @@
package co.jp.app.controller;
import co.jp.app.common.ApiResponse;
import co.jp.app.dto.LoginDto;
import co.jp.app.dto.RegistrationDto;
import co.jp.app.service.JwtService;
import jakarta.validation.Valid;
import java.util.HashMap;
import java.util.Map;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AuthenticationManager;
@ -13,15 +11,18 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import co.jp.app.entity.ErrorEntity;
import co.jp.app.common.ApiResponse;
import co.jp.app.dto.LoginDto;
import co.jp.app.dto.RegistrationDto;
import co.jp.app.entity.UserEntity;
import co.jp.app.service.ErraService;
import co.jp.app.service.JwtService;
import co.jp.app.service.UserService;
import java.util.HashMap;
import java.util.Map;
import jakarta.validation.Valid;
@RestController
@RequestMapping("/api/user")

View File

@ -1,13 +1,12 @@
package co.jp.app.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import java.util.Optional;
import co.jp.app.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Optional;
import co.jp.app.entity.UserEntity;
@Repository
public interface UserRepository extends JpaRepository<UserEntity, Integer> {