diff --git a/src/main/kotlin/com/test/rest/TestController.kt b/src/main/kotlin/com/test/rest/TestController.kt index c77e711..9b7bd79 100644 --- a/src/main/kotlin/com/test/rest/TestController.kt +++ b/src/main/kotlin/com/test/rest/TestController.kt @@ -21,29 +21,29 @@ open class TestController(private val testService: TestService) { //@PreAuthorize("hasRole('ADMIN')") //@PreAuthorize("hasRole('USER')") - @PostMapping("/add") - fun add(@RequestBody testModel: TestModel): TestModel { - return testService.add(testModel) - } - - @PutMapping("/update") - fun users(@RequestBody testModel: TestModel): TestModel { - return testService.update(testModel) - } - - @GetMapping("/{id}") - fun get(@PathVariable(value = "id") id: Long): TestModel { - return testService.get(id)!! - } - - @DeleteMapping("/{id}") - fun delete(@RequestBody id: Long) { - testService.remove(id) - } - - @GetMapping("/") - fun getAll(): List { - return testService.getAll() - } +// @PostMapping("/add") +// fun add(@RequestBody testModel: TestModel): TestModel { +// return testService.add(testModel) +// } +// +// @PutMapping("/update") +// fun users(@RequestBody testModel: TestModel): TestModel { +// return testService.update(testModel) +// } +// +// @GetMapping("/{id}") +// fun get(@PathVariable(value = "id") id: Long): TestModel { +// return testService.get(id)!! +// } +// +// @DeleteMapping("/{id}") +// fun delete(@RequestBody id: Long) { +// testService.remove(id) +// } +// +// @GetMapping("/") +// fun getAll(): List { +// return testService.getAll() +// } } \ No newline at end of file diff --git a/src/main/kotlin/com/test/service/TestService.kt b/src/main/kotlin/com/test/service/TestService.kt index b60e9a2..c858f3b 100644 --- a/src/main/kotlin/com/test/service/TestService.kt +++ b/src/main/kotlin/com/test/service/TestService.kt @@ -3,11 +3,11 @@ package com.test.service import com.test.entities.TestEntity import com.test.model.TestModel import com.test.repository.TestEntityRepository -import org.springframework.data.repository.findByIdOrNull +//import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service @Service -class TestService(){//private val testEntityRepository: TestEntityRepository) { +class TestService() { // fun add(model: TestModel): TestModel { // var entity = testEntityRepository.save(TestEntity(null, model.key, model.value)) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 53eeed7..65c51ab 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -17,15 +17,15 @@ spring: driver-class-name: org.postgresql.Driver # JPA - jpa: - hibernate: - # ddl-auto: validate - show-sql: true - properties: - hibernate: - format_sql: true - database: postgresql - database-platform: org.hibernate.dialect.PostgreSQLDialect +# jpa: +# hibernate: +# # ddl-auto: validate +# show-sql: true +# properties: +# hibernate: +# format_sql: true +# database: postgresql +# database-platform: org.hibernate.dialect.PostgreSQLDialect # Keycloak Security security: @@ -44,8 +44,8 @@ logging: org.springframework.security: DEBUG - # Flyway - flyway: - enabled: true - locations: classpath:db/migration - baseline-on-migrate: true \ No newline at end of file +# # Flyway +# flyway: +# enabled: true +# locations: classpath:db/migration +# baseline-on-migrate: true \ No newline at end of file