- SVN : https://dev.naver.com/svn/naverapis/trunk/naver-java-client-samples/
- ID : anonsvn
- Password : anonsvn
- Maven 프로젝트
- Checkout후 mvn eclipse:eclipse로 이클립스 프로젝트 생성
This file contains hidden or 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
DefaultHttpClient client = new DefaultHttpClient(); | |
// HttpClient를 매번생성하지 않고 ThreadSafeClientConnManager 를 활용하는 것이 바람직 | |
HttpPost request = new HttpPost(apiUrl); | |
UrlEncodedFormEntity formEntity = createEntity(userId, password); | |
request.setEntity(formEntity); | |
InputStream contentStream = null; | |
String resContent = null; |
This file contains hidden or 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
import org.junit.Test; | |
import com.carrotsearch.junitbenchmarks.AbstractBenchmark; | |
import com.carrotsearch.junitbenchmarks.BenchmarkOptions; | |
import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart; | |
/** | |
* @author benelog | |
*/ | |
@BenchmarkMethodChart(filePrefix = "benchmark-sample") |
This file contains hidden or 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
package net.benelog.schedule; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class SpelSchedule { | |
public void hello1() { | |
System.out.println("hello1!!!"); | |
} |
This file contains hidden or 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
private Date getNowGmt() { | |
TimeZone gmt = TimeZone.getTimeZone("GMT"); | |
Calendar calendar = Calendar.getInstance(gmt); | |
return calendar.getTime(); | |
} |
This file contains hidden or 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
@RequestMapping("/saveBoard") | |
public String saveBoard(@ModelAttribute @Valid Board board, BindingResult binding) { | |
if (binding.hasErrors()) { | |
return "boardInputForm"; | |
} | |
Integer seq = service.save(board); | |
return "redirect:boardDetail/" + seq; | |
} |
This file contains hidden or 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
<dependency> | |
<groupId>com.h2database</groupId> | |
<artifactId>h2</artifactId> | |
<version>1.3.166</version> | |
</dependency> |
This file contains hidden or 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
from flask import Flask | |
from flask import request | |
import sys | |
app = Flask(__name__) | |
port = sys.argv[1]; | |
@app.route("/") | |
def home(): | |
msg = request.args.get('msg') |
This file contains hidden or 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
package net.benelog.markerboard.presentation; | |
import java.io.IOException; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; |