Skip to content

Instantly share code, notes, and snippets.

@arijit83sarkar
Created May 21, 2023 19:01
Show Gist options
  • Save arijit83sarkar/4b38146ec02481c19afb82ef02f41538 to your computer and use it in GitHub Desktop.
Save arijit83sarkar/4b38146ec02481c19afb82ef02f41538 to your computer and use it in GitHub Desktop.
How To Use JDBCTemplate In Spring Boot With Swagger OpenAPI
package com.raven.jdbctemplate.repository;
import java.util.List;
import java.util.Optional;
import com.raven.jdbctemplate.model.CustomerModel;
public interface CustomerRepository {
// gets the total record count
int count();
// saves a customer
int saveCustomer(CustomerModel customerModel);
// updates an existing customer
int updateCustomer(CustomerModel customerModel, int id);
// deletes ann existing customer
int deleteCustomer(int id);
// get all customer
List<CustomerModel> findAll();
// get a customer by CustomerNumber
Optional<CustomerModel> findByCustomerNumber(int id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment