This commit is contained in:
parent
cebfde04b7
commit
23e9658bd5
|
@ -40,6 +40,8 @@ dependencies {
|
|||
|
||||
implementation("org.apache.httpcomponents:httpclient:4.5.14")
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
implementation("org.apache.poi:poi-ooxml:5.2.2")
|
||||
|
||||
|
||||
runtimeOnly("com.mysql:mysql-connector-j")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#Sat Aug 10 19:08:03 CST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.8-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package org.echo
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
|
||||
@SpringBootApplication
|
||||
class QuestionnaireApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
runApplication<QuestionnaireApplication>(*args)
|
||||
}
|
|
@ -478,27 +478,6 @@ enum class ComputeMethod(
|
|||
): Double
|
||||
}
|
||||
|
||||
|
||||
interface QuestionnaireRepository {
|
||||
fun save(questionnaire: Questionnaire): Questionnaire
|
||||
fun findById(id: Long): Optional<Questionnaire>
|
||||
}
|
||||
|
||||
@Repository
|
||||
class QuestionnaireRepositoryImpl(private val jdbcQuestionnaireRepository: JdbcQuestionnaireRepository) :
|
||||
QuestionnaireRepository {
|
||||
override fun save(questionnaire: Questionnaire): Questionnaire {
|
||||
return jdbcQuestionnaireRepository.save(questionnaire)
|
||||
}
|
||||
|
||||
override fun findById(id: Long): Optional<Questionnaire> {
|
||||
return jdbcQuestionnaireRepository.findById(id)
|
||||
}
|
||||
}
|
||||
|
||||
@Repository
|
||||
interface JdbcQuestionnaireRepository : CrudRepository<Questionnaire, Long>
|
||||
|
||||
@DslMarker
|
||||
annotation class QuestionnaireDsl
|
||||
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package org.echo.questionnaire
|
||||
|
||||
import org.echo.org.echo.questionnaire.Questionnaire
|
||||
import org.springframework.data.repository.CrudRepository
|
||||
import org.springframework.stereotype.Repository
|
||||
import java.util.*
|
||||
|
||||
|
||||
interface QuestionnaireRepository {
|
||||
fun save(questionnaire: Questionnaire): Questionnaire
|
||||
fun findById(id: Long): Optional<Questionnaire>
|
||||
}
|
||||
|
||||
@Repository
|
||||
class QuestionnaireRepositoryImpl(private val jdbcQuestionnaireRepository: JdbcQuestionnaireRepository) :
|
||||
QuestionnaireRepository {
|
||||
override fun save(questionnaire: Questionnaire): Questionnaire {
|
||||
return jdbcQuestionnaireRepository.save(questionnaire)
|
||||
}
|
||||
|
||||
override fun findById(id: Long): Optional<Questionnaire> {
|
||||
return jdbcQuestionnaireRepository.findById(id)
|
||||
}
|
||||
}
|
||||
|
||||
@Repository
|
||||
interface JdbcQuestionnaireRepository : CrudRepository<Questionnaire, Long>
|
Loading…
Reference in New Issue