Relative Content

Tag Archive for javaspring-boot

SpringBoot Values doesnt gives data

im trying to use the @Value for some of my strings in SpringBoot, when i set the @Value the string doesn’t get the data, i don’t know if i have to make a principal configuration or something that im forgetting (im new in springboot)

Iam having category class inside product class, when trying to use for loop and map it response DTO iam getting many outputs when i test the API

“public List<ProductResponseDTO> getallproducts() { List<Products> productsList= productRepository.findAll(); List<ProductResponseDTO> productResponseDTOS = new ArrayList<>(); for(Products p: productsList){ ProductResponseDTO productResponseDTO = new ProductResponseDTO(); productResponseDTO.setUuid(p.getUuid()); productResponseDTO.setName(p.getName()); productResponseDTO.setPrice(p.getPrice()); productResponseDTO.setImage(p.getImage()); productResponseDTO.setDescription(p.getDescription()); productResponseDTO.setCategory(p.getCategory()); productResponseDTOS.add(productResponseDTO); } return productResponseDTOS`; Iam having category class inside product class, when trying to use for loop and map it response DTO iam getting many outputs when i try […]