adding package-info files and move a controller to the package with tthe res of them

This commit is contained in:
2025-12-01 15:41:55 -05:00
parent 0f5978fd11
commit 66d45a1113
19 changed files with 154 additions and 100 deletions

View File

@@ -7,7 +7,9 @@ import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
@SpringBootApplication @SpringBootApplication
//@ComponentScan(basePackages = "group.goforward.ballistic") @ComponentScan("group.goforward.ballistic.controllers")
@ComponentScan("group.goforward.ballistic.repos")
@ComponentScan("group.goforward.ballistic.services")
@EntityScan(basePackages = "group.goforward.ballistic.model") @EntityScan(basePackages = "group.goforward.ballistic.model")
@EnableJpaRepositories(basePackages = "group.goforward.ballistic.repos") @EnableJpaRepositories(basePackages = "group.goforward.ballistic.repos")
public class BallisticApplication { public class BallisticApplication {

View File

@@ -1 +1,13 @@
/**
* Provides the classes necessary for the Spring Configurations for the ballistic -Builder application.
* This package includes Configurations for Spring-Boot application
*
*
* <p>The main entry point for managing the inventory is the
* {@link group.goforward.ballistic.BallisticApplication} class.</p>
*
* @since 1.0
* @author Don Strawsburg
* @version 1.1
*/
package group.goforward.ballistic.configuration; package group.goforward.ballistic.configuration;

View File

@@ -1,6 +1,6 @@
package group.goforward.ballistic.controllers; package group.goforward.ballistic.controllers;
import group.goforward.ballistic.imports.MerchantFeedImportService; import group.goforward.ballistic.services.MerchantFeedImportService;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@@ -3,7 +3,7 @@ package group.goforward.ballistic.controllers;
import group.goforward.ballistic.model.Merchant; import group.goforward.ballistic.model.Merchant;
import group.goforward.ballistic.model.MerchantCategoryMapping; import group.goforward.ballistic.model.MerchantCategoryMapping;
import group.goforward.ballistic.repos.MerchantRepository; import group.goforward.ballistic.repos.MerchantRepository;
import group.goforward.ballistic.service.MerchantCategoryMappingService; import group.goforward.ballistic.services.MerchantCategoryMappingService;
import group.goforward.ballistic.web.dto.MerchantCategoryMappingDto; import group.goforward.ballistic.web.dto.MerchantCategoryMappingDto;
import group.goforward.ballistic.web.dto.UpsertMerchantCategoryMappingRequest; import group.goforward.ballistic.web.dto.UpsertMerchantCategoryMappingRequest;
import java.util.List; import java.util.List;

View File

@@ -1,7 +1,7 @@
package group.goforward.ballistic.controllers; package group.goforward.ballistic.controllers;
import group.goforward.ballistic.model.Psa; import group.goforward.ballistic.model.Psa;
import group.goforward.ballistic.service.PsaService; import group.goforward.ballistic.services.PsaService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@@ -3,7 +3,7 @@ package group.goforward.ballistic.controllers;
import group.goforward.ballistic.ApiResponse; import group.goforward.ballistic.ApiResponse;
import group.goforward.ballistic.model.State; import group.goforward.ballistic.model.State;
import group.goforward.ballistic.repos.StateRepository; import group.goforward.ballistic.repos.StateRepository;
import group.goforward.ballistic.service.StatesService; import group.goforward.ballistic.services.StatesService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@@ -0,0 +1 @@
package group.goforward.ballistic.controllers;

View File

@@ -0,0 +1 @@
package group.goforward.ballistic.imports.dto;

View File

@@ -0,0 +1 @@
package group.goforward.ballistic.model;

View File

@@ -0,0 +1,13 @@
/**
* Provides the classes necessary for the Spring Repository for the ballistic -Builder application.
* This package includes Repository for Spring-Boot application
*
*
* <p>The main entry point for managing the inventory is the
* {@link group.goforward.ballistic.BallisticApplication} class.</p>
*
* @since 1.0
* @author Sean Strawsburg
* @version 1.1
*/
package group.goforward.ballistic.repos;

View File

@@ -1,4 +1,4 @@
package group.goforward.ballistic.service; package group.goforward.ballistic.services;
import group.goforward.ballistic.model.Merchant; import group.goforward.ballistic.model.Merchant;
import group.goforward.ballistic.model.MerchantCategoryMapping; import group.goforward.ballistic.model.MerchantCategoryMapping;

View File

@@ -1,4 +1,4 @@
package group.goforward.ballistic.imports; package group.goforward.ballistic.services;
public interface MerchantFeedImportService { public interface MerchantFeedImportService {

View File

@@ -1,4 +1,4 @@
package group.goforward.ballistic.service; package group.goforward.ballistic.services;
import group.goforward.ballistic.model.Psa; import group.goforward.ballistic.model.Psa;
import group.goforward.ballistic.repos.PsaRepository; import group.goforward.ballistic.repos.PsaRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -9,7 +9,7 @@ import java.util.Optional;
import java.util.UUID; import java.util.UUID;
@Service @Service
public class PsaService { public class PsaService implements group.goforward.ballistic.services.impl.PsaService {
private final PsaRepository psaRepository; private final PsaRepository psaRepository;
@@ -18,18 +18,22 @@ public class PsaService {
this.psaRepository = psaRepository; this.psaRepository = psaRepository;
} }
@Override
public List<Psa> findAll() { public List<Psa> findAll() {
return psaRepository.findAll(); return psaRepository.findAll();
} }
@Override
public Optional<Psa> findById(UUID id) { public Optional<Psa> findById(UUID id) {
return psaRepository.findById(id); return psaRepository.findById(id);
} }
@Override
public Psa save(Psa psa) { public Psa save(Psa psa) {
return psaRepository.save(psa); return psaRepository.save(psa);
} }
@Override
public void deleteById(UUID id) { public void deleteById(UUID id) {
psaRepository.deleteById(id); psaRepository.deleteById(id);
} }

View File

@@ -1,4 +1,4 @@
package group.goforward.ballistic.service; package group.goforward.ballistic.services;
import group.goforward.ballistic.model.State; import group.goforward.ballistic.model.State;

View File

@@ -1,4 +1,4 @@
package group.goforward.ballistic.imports; package group.goforward.ballistic.services.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
@@ -9,6 +9,8 @@ import java.io.InputStreamReader;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import group.goforward.ballistic.imports.MerchantFeedRow;
import group.goforward.ballistic.services.MerchantFeedImportService;
import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord; import org.apache.commons.csv.CSVRecord;
@@ -19,8 +21,7 @@ import group.goforward.ballistic.model.Product;
import group.goforward.ballistic.repos.BrandRepository; import group.goforward.ballistic.repos.BrandRepository;
import group.goforward.ballistic.repos.MerchantRepository; import group.goforward.ballistic.repos.MerchantRepository;
import group.goforward.ballistic.repos.ProductRepository; import group.goforward.ballistic.repos.ProductRepository;
import group.goforward.ballistic.service.MerchantCategoryMappingService; import group.goforward.ballistic.services.MerchantCategoryMappingService;
import group.goforward.ballistic.service.MerchantCategoryMappingService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import group.goforward.ballistic.repos.ProductOfferRepository; import group.goforward.ballistic.repos.ProductOfferRepository;

View File

@@ -0,0 +1,17 @@
package group.goforward.ballistic.services.impl;
import group.goforward.ballistic.model.Psa;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
public interface PsaService {
List<Psa> findAll();
Optional<Psa> findById(UUID id);
Psa save(Psa psa);
void deleteById(UUID id);
}

View File

@@ -1,9 +1,9 @@
package group.goforward.ballistic.service.impl; package group.goforward.ballistic.services.impl;
import group.goforward.ballistic.model.State; import group.goforward.ballistic.model.State;
import group.goforward.ballistic.repos.StateRepository; import group.goforward.ballistic.repos.StateRepository;
import group.goforward.ballistic.service.StatesService; import group.goforward.ballistic.services.StatesService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@@ -0,0 +1 @@
package group.goforward.ballistic.services.impl;

View File

@@ -0,0 +1 @@
package group.goforward.ballistic.services;