title: required a bean of type 'java.lang.String' that could not be found
body: <p>This the error iam when I tried start my spring boot application getting on console Action:
  Consider defining a bean of type
  'java.lang.String' in your
  configuration.</p>
  <p>My code</p>
  <pre><code>@Repository
  public class ProductRepository {
  
  @Autowired
  JdbcTemplate jdbcTemplate;
  
  @Bean
  public void addProduct(String name) {
      String sql = &quot;INSERT INTO product VALUES (NULL, ?)&quot;;
      jdbcTemplate.update(sql, name);
  }
  }
  
  
  @Service
  public class ProductService {
  
  @Autowired
  ProductRepository productRepository;
  
  
  public void addProduct(String name) {
      productRepository.addProduct(name);
  }
  }
  
  
  
  @RestController
  @RequestMapping(path=&quot;product&quot;)
  public class ProductController {
  
  @Autowired
  ProductService productService;
  
  @PostMapping(path=&quot;/add/{name}&quot;)
  public void addProduct(@PathVariable 
  String name) {
      productService.addProduct(name);
  }
  }
  </code></pre>