Changed folder structure

This commit is contained in:
2023-09-21 12:37:28 +03:00
parent ac175a6bd2
commit 984304a465
10 changed files with 184 additions and 13 deletions

View File

@@ -0,0 +1,9 @@
package com.faf223.expensetrackerfaf.service;
import com.faf223.expensetrackerfaf.model.BasicEntity;
import java.util.List;
public interface BasicService {
List<BasicEntity> getAllData();
}

View File

@@ -0,0 +1,23 @@
package com.faf223.expensetrackerfaf.service;
import com.faf223.expensetrackerfaf.model.BasicEntity;
import com.faf223.expensetrackerfaf.repository.BasicRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class BasicServiceImpl implements BasicService {
private final BasicRepository basicRepository;
@Autowired
public BasicServiceImpl(BasicRepository basicRepository) {
this.basicRepository = basicRepository;
}
@Override
public List<BasicEntity> getAllData() {
return basicRepository.findAll();
}
}