Skip to content

Instantly share code, notes, and snippets.

View digimon1740's full-sized avatar
🎯
Focusing

sanghoon lee digimon1740

🎯
Focusing
View GitHub Profile
{
"id": 3,
"content": "λ‚΄μš©1",
"done": false,
"createdAt": "2019-08-28T19:57:51.298743",
"modifiedAt": "2019-08-28T19:57:51.298743"
}
curl -X POST http://localhost:8080/todos -H 'Content-Type: application/json' -d '{ "content" : "λ‚΄μš©1" }'
<!-- H2 Database -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Kotlin -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency>
<!-- Spring Boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
spring:
profiles:
active: dev
jpa:
show-sql: true
main:
allow-bean-definition-overriding: true
package com.digimon.demo.handler
import com.digimon.demo.domain.todo.Todo
import com.digimon.demo.domain.todo.TodoRepository
import org.springframework.http.MediaType
import org.springframework.stereotype.Component
import org.springframework.web.reactive.function.server.ServerRequest
import org.springframework.web.reactive.function.server.ServerResponse
import org.springframework.web.reactive.function.server.ServerResponse.notFound
import org.springframework.web.reactive.function.server.ServerResponse.ok
package com.digimon.demo.router
import com.digimon.demo.handler.TodoHandler
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.reactive.function.server.RequestPredicates.path
import org.springframework.web.reactive.function.server.RouterFunctions.nest
import org.springframework.web.reactive.function.server.router
package com.digimon.demo.domain.todo
import org.springframework.data.jpa.repository.JpaRepository
interface TodoRepository : JpaRepository<Todo, Long>
@digimon1740
digimon1740 / gist:9b2ba5aae5a661b378a5ddd1ef28db58
Created January 11, 2017 03:17
javascript 둜 url의 parameter λ₯Ό νŒŒμ‹±ν•˜λŠ” ν•¨μˆ˜
function getUrlQueries() {
var args = {};
var query = location.search.substring(1);
var pairs = query.split("&");
for (var i = 0; i < pairs.length; i++) {
var pos = pairs[i].indexOf('=');
if (pos == -1) continue;
var name = pairs[i].substring(0, pos);
var value = pairs[i].substring(pos + 1);
value = decodeURIComponent(value);