Compare commits

...

2 Commits

Author SHA1 Message Date
9ea0721375 reupload 2025-05-12 14:19:49 +09:00
cacdef44d7 renew 2025-05-12 14:13:25 +09:00
31 changed files with 106 additions and 16 deletions

1
bin Submodule

Submodule bin added at aa8d8275e8

View 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";
}
}

View 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);
}
}

View File

@ -0,0 +1,18 @@
package co.jp.app.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import co.jp.app.entity.UserEntity;
public interface userRepository extends JpaRepository<UserEntity, Integer> {
public default UserEntity getByName(@Param("name") String name) {
return getByName(name);
}
public default UserEntity getByEmail(@Param("email")String email) {
return getByEmail(email);
}
}

View 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);
}
}

View File

@ -1,5 +1,15 @@
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.Collections;
import java.util.List;
@ -20,16 +30,28 @@ import org.springframework.stereotype.Service;
import co.jp.app.entity.PetEntity;
import co.jp.app.repository.UploadRepository;
import org.springframework.transaction.annotation.Transactional;
>>>>>>> 34de018ef0606dec4f6de48c8cc5c3f073a1fdc6
@Service
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 PasswordEncoder passwordEncoder;
public UserService(UserRepository userRepository, PasswordEncoder passwordEncoder) {
this.userRepository = userRepository;
this.passwordEncoder = passwordEncoder;
>>>>>>> 34de018ef0606dec4f6de48c8cc5c3f073a1fdc6
}
@Transactional

View File

@ -1 +0,0 @@
/co/

View File

@ -1,6 +1,6 @@
#Generated by Maven Integration for Eclipse
#Mon May 12 11:38:52 JST 2025
m2e.projectLocation=E\:\\jugyo\\asciimg-master\\Dog-1
#Mon May 12 14:19:16 JST 2025
m2e.projectLocation=C\:\\Users\\ichbi\\OneDrive\\\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\\dog-1
m2e.projectName=dog-1
groupId=co.jp.app
artifactId=dog-2

View File

@ -1,13 +0,0 @@
spring.application.name=dog-1
spring.sql.init.platform=mysql
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
spring.datasource.url=jdbc:mysql://192.168.1.192:3306/dog
spring.datasource.username=coder
spring.datasource.password=coder
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
jwt.secret=wM7Pz4BxvZ5NcLaBpgJm0eRQ5ztc3W5+OPH0E7g3gcQ=
jwt.token-expiration-ms==900000

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB