Merge remote-tracking branch 'origin/master'
This commit is contained in:
1
bin
Submodule
1
bin
Submodule
Submodule bin added at aa8d8275e8
23
src/main/java/co/jp/app/controller/DownloadController.java
Normal file
23
src/main/java/co/jp/app/controller/DownloadController.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package co.jp.app.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import co.jp.app.service.PetService;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class DownloadController {
|
||||||
|
@Autowired
|
||||||
|
private PetService service;
|
||||||
|
|
||||||
|
@GetMapping("/api/dogs/pet")
|
||||||
|
public String downloadById(@RequestParam List<Integer> id) {
|
||||||
|
service.getPetByID(id);
|
||||||
|
return "pet";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,19 +9,20 @@ import org.springframework.web.bind.annotation.CrossOrigin;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
import co.jp.app.entity.PetEntity;
|
import co.jp.app.entity.PetEntity;
|
||||||
|
import co.jp.app.service.UploadService;
|
||||||
|
|
||||||
@CrossOrigin("http://192.168.1.50:5173")
|
@CrossOrigin("http://192.168.1.50:5173")
|
||||||
@Controller
|
@Controller
|
||||||
public class UploadController {
|
public class UploadController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
//private UploadService service;
|
private UploadService service;
|
||||||
|
|
||||||
@PostMapping("/api/dogs/upload")
|
@PostMapping("/api/dogs/upload")
|
||||||
public String upload() {
|
public String upload() {
|
||||||
List<PetEntity> list = new ArrayList<PetEntity>();
|
List<PetEntity> list = new ArrayList<PetEntity>();
|
||||||
|
|
||||||
//service.saveAll(list);
|
service.saveAllPets(list);
|
||||||
|
|
||||||
return "upload";
|
return "upload";
|
||||||
|
|
||||||
|
17
src/main/java/co/jp/app/repository/DownloadRepository.java
Normal file
17
src/main/java/co/jp/app/repository/DownloadRepository.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package co.jp.app.repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import co.jp.app.entity.PetEntity;
|
||||||
|
|
||||||
|
public interface DownloadRepository extends JpaRepository<PetEntity, Integer>{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default List<PetEntity> findAllById(Iterable<Integer> id) {
|
||||||
|
return findAllById(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
23
src/main/java/co/jp/app/service/DownloadService.java
Normal file
23
src/main/java/co/jp/app/service/DownloadService.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package co.jp.app.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import co.jp.app.entity.PetEntity;
|
||||||
|
import co.jp.app.repository.DownloadRepository;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DownloadService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DownloadRepository downloadDao;
|
||||||
|
|
||||||
|
public List<PetEntity> getPetByID(Iterable<Integer> id) {
|
||||||
|
|
||||||
|
return downloadDao.findAllById(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
21
src/main/java/co/jp/app/service/UploadService.java
Normal file
21
src/main/java/co/jp/app/service/UploadService.java
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package co.jp.app.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import co.jp.app.entity.PetEntity;
|
||||||
|
import co.jp.app.repository.UploadRepository;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UploadService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UploadRepository uploadDao;
|
||||||
|
|
||||||
|
public List<PetEntity> saveAllPets(List<PetEntity> entities) {
|
||||||
|
return uploadDao.saveAll(entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,15 @@
|
|||||||
package co.jp.app.service;
|
package co.jp.app.service;
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import co.jp.app.entity.UserEntity;
|
||||||
|
import co.jp.app.repository.userRepository;
|
||||||
|
import jakarta.transaction.Transactional;
|
||||||
|
|
||||||
|
=======
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
@ -17,16 +27,28 @@ import org.springframework.security.crypto.password.PasswordEncoder;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
>>>>>>> 34de018ef0606dec4f6de48c8cc5c3f073a1fdc6
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class UserService implements UserDetailsService {
|
public class UserService implements UserDetailsService {
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
private final userRepository userEntityRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public UserService(userRepository userEntityRepository, PasswordEncoder passwordEncoder )
|
||||||
|
{
|
||||||
|
this.userEntityRepository = userEntityRepository;
|
||||||
|
this.passwordEncoder= passwordEncoder;
|
||||||
|
|
||||||
|
=======
|
||||||
private final UserRepository userRepository;
|
private final UserRepository userRepository;
|
||||||
private final PasswordEncoder passwordEncoder;
|
private final PasswordEncoder passwordEncoder;
|
||||||
|
|
||||||
public UserService(UserRepository userRepository, PasswordEncoder passwordEncoder) {
|
public UserService(UserRepository userRepository, PasswordEncoder passwordEncoder) {
|
||||||
this.userRepository = userRepository;
|
this.userRepository = userRepository;
|
||||||
this.passwordEncoder = passwordEncoder;
|
this.passwordEncoder = passwordEncoder;
|
||||||
|
>>>>>>> 34de018ef0606dec4f6de48c8cc5c3f073a1fdc6
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
1
target/classes/.gitignore
vendored
1
target/classes/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
/co/
|
|
@ -1,6 +1,6 @@
|
|||||||
#Generated by Maven Integration for Eclipse
|
#Generated by Maven Integration for Eclipse
|
||||||
#Mon May 12 11:38:52 JST 2025
|
#Mon May 12 14:19:16 JST 2025
|
||||||
m2e.projectLocation=E\:\\jugyo\\asciimg-master\\Dog-1
|
m2e.projectLocation=C\:\\Users\\ichbi\\OneDrive\\\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\\dog-1
|
||||||
m2e.projectName=dog-1
|
m2e.projectName=dog-1
|
||||||
groupId=co.jp.app
|
groupId=co.jp.app
|
||||||
artifactId=dog-2
|
artifactId=dog-2
|
||||||
|
@ -10,4 +10,4 @@ spring.datasource.password=coder
|
|||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
jwt.secret=wM7Pz4BxvZ5NcLaBpgJm0eRQ5ztc3W5+OPH0E7g3gcQ=
|
jwt.secret=wM7Pz4BxvZ5NcLaBpgJm0eRQ5ztc3W5+OPH0E7g3gcQ=
|
||||||
jwt.token-expiration-ms==900000
|
jwt.token-expiration-ms=900000
|
BIN
target/classes/co/jp/app/common/ApiResponse.class
Normal file
BIN
target/classes/co/jp/app/common/ApiResponse.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/config/CorsConfig.class
Normal file
BIN
target/classes/co/jp/app/config/CorsConfig.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/config/security/SecurityConfig.class
Normal file
BIN
target/classes/co/jp/app/config/security/SecurityConfig.class
Normal file
Binary file not shown.
Binary file not shown.
BIN
target/classes/co/jp/app/controller/DownloadController.class
Normal file
BIN
target/classes/co/jp/app/controller/DownloadController.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/controller/UserController.class
Normal file
BIN
target/classes/co/jp/app/controller/UserController.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/controller/uploadController.class
Normal file
BIN
target/classes/co/jp/app/controller/uploadController.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/dto/LoginDto.class
Normal file
BIN
target/classes/co/jp/app/dto/LoginDto.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/dto/RegistrationDto.class
Normal file
BIN
target/classes/co/jp/app/dto/RegistrationDto.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/repository/DownloadRepository.class
Normal file
BIN
target/classes/co/jp/app/repository/DownloadRepository.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/repository/ErrRepository.class
Normal file
BIN
target/classes/co/jp/app/repository/ErrRepository.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/repository/uploadRepository.class
Normal file
BIN
target/classes/co/jp/app/repository/uploadRepository.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/repository/userRepository.class
Normal file
BIN
target/classes/co/jp/app/repository/userRepository.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/service/DownloadService.class
Normal file
BIN
target/classes/co/jp/app/service/DownloadService.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/service/JwtService.class
Normal file
BIN
target/classes/co/jp/app/service/JwtService.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/service/UploadService.class
Normal file
BIN
target/classes/co/jp/app/service/UploadService.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/service/erraService.class
Normal file
BIN
target/classes/co/jp/app/service/erraService.class
Normal file
Binary file not shown.
BIN
target/classes/co/jp/app/service/userService.class
Normal file
BIN
target/classes/co/jp/app/service/userService.class
Normal file
Binary file not shown.
Reference in New Issue
Block a user