-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat : Spring Data JDBC 적용 - Spring Data JDBC 적용을 위한 GameRoomRepository 구현 - schema.sql 구현 * feat : GameHistory, GameRoom Entity 구현
- Loading branch information
Showing
31 changed files
with
311 additions
and
1,269 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
86 changes: 0 additions & 86 deletions
86
src/main/java/wooteco/chess/controller/SparkChessController.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/main/java/wooteco/chess/database/GameRoomRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package wooteco.chess.database; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.data.jdbc.repository.query.Query; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import wooteco.chess.entity.GameRoom; | ||
|
||
public interface GameRoomRepository extends CrudRepository<GameRoom, Long> { | ||
|
||
@Override | ||
List<GameRoom> findAll(); | ||
|
||
@Query("SELECT * FROM game_room WHERE name = :name") | ||
GameRoom findByName(@Param("name") final String name); | ||
|
||
} |
Oops, something went wrong.