Skip to content

Commit fc94ca5

Browse files
김산김산
authored andcommitted
[#7] Fix: duplicated function
1 parent db943bb commit fc94ca5

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/main/java/com/example/helper/repository/SqlMealRepository.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,6 @@ public Optional<Meal> findById(Long mealId) {
5151
return Optional.ofNullable(meal);
5252
}
5353

54-
public Optional<Meal> findByDate(Integer bldgType, Integer langType, Integer kindType, String date) {
55-
List<Meal> result = em.createQuery("select m from Meal m where " +
56-
"m.bldgType = :bldgType and m.langType = :langType and m.kindType = :kindType " +
57-
"and m.date = :date", Meal.class)
58-
.setParameter("bldgType", bldgType)
59-
.setParameter("langType", langType)
60-
.setParameter("kindType", kindType)
61-
.setParameter("date", date)
62-
.getResultList();
63-
64-
return result.stream().findAny();
65-
}
66-
6754
@Override
6855
public Long delete(Long mealId) {
6956
return null;

src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/helper_db
33
spring.datasource.username=helper
44
spring.datasource.password=12345678
55
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
6-
spring.jpa.hibernate.ddl-auto=validate
6+
spring.jpa.hibernate.ddl-auto=create
77

88
spring.jpa.show-sql=true
99
spring.jpa.properties.hibernate.format_sql=true

0 commit comments

Comments
 (0)