Skip to content

Commit

Permalink
remove field injection
Browse files Browse the repository at this point in the history
  • Loading branch information
AnuchitO committed Mar 20, 2024
1 parent 796db5e commit e81dff5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
@RequestMapping("/api/v1")
public class ProductController {

@Autowired private ProductRepository productRepository;
private ProductRepository productRepository;

public ProductController(ProductRepository productRepository) {
this.productRepository = productRepository;
}

protected static final Product[] productsDB =
new Product[] {
Expand Down

0 comments on commit e81dff5

Please sign in to comment.