-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
H2 version extracted to properties file, DB configuration keys moved …
…to the application.yaml , changed routes and project description at README.md , DatabaseFactory renamed to DatabaseSingleton for consistency
- Loading branch information
1 parent
f238d8d
commit 5d41ee8
Showing
8 changed files
with
31 additions
and
37 deletions.
There are no files selected for viewing
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 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 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
kotlin_version=1.9.20 | ||
logback_version=1.4.11 | ||
exposed_version=0.41.1 | ||
h2_version=2.1.214 | ||
kotlin.code.style=official |
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 |
---|---|---|
@@ -1,18 +1,19 @@ | ||
package com.example | ||
|
||
import com.example.model.DatabaseFactory | ||
import com.example.plugins.* | ||
import com.example.model.DatabaseSingleton | ||
import com.example.plugins.configureRouting | ||
import com.example.plugins.configureTemplating | ||
import io.ktor.server.application.* | ||
import io.ktor.server.engine.* | ||
import io.ktor.server.netty.* | ||
|
||
fun main() { | ||
embeddedServer(Netty, port = 8080, host = "0.0.0.0", module = Application::module) | ||
.start(wait = true) | ||
} | ||
fun main(args: Array<String>): Unit = EngineMain.main(args) | ||
|
||
fun Application.module() { | ||
DatabaseFactory.init() | ||
DatabaseSingleton.init( | ||
environment.config.property("ktor.application.datasource.url").getString(), | ||
environment.config.property("ktor.application.datasource.driverClassName").getString() | ||
) | ||
|
||
configureTemplating() | ||
configureRouting() | ||
} |
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
2 changes: 1 addition & 1 deletion
2
mvc-web/src/main/kotlin/com/example/model/dao/wishlist/WishlistDAOFacadeImpl.kt
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 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,9 @@ | ||
ktor: | ||
application: | ||
modules: | ||
- com.example.ApplicationKt.module | ||
datasource: | ||
url: "jdbc:h2:file:./build/db" | ||
driverClassName: "org.h2.Driver" | ||
deployment: | ||
port: 8080 |
This file was deleted.
Oops, something went wrong.