Skip to content

Instantly share code, notes, and snippets.

View karian7's full-sized avatar
🎯
Focusing

koasu karian7

🎯
Focusing
View GitHub Profile
package com.daumcorp.cafe.gravatar;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* Created by karian7 on 2/18/14.
*/
public class MD5Utils {
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.daumcorp.maven.parent</groupId>
<artifactId>daum-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
-- insert
insert into comment (email, comment, create_time) values (?, ?, CURRENT_TIMESTAMP)
-- select
select no, email, comment, create_time from comment order by no desc limit ? offset ?
-- select v2
select no, email, comment, create_time from comment where email = ? order by no desc limit ? offset ?
package com.daumcorp.be;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.postgresql.ds.PGSimpleDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
package com.daumcorp.be;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.postgresql.ds.PGSimpleDataSource;
import javax.sql.DataSource;
package com.daumcorp.be;
import org.apache.commons.lang.StringUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.internal.matchers.apachecommons.ReflectionEquals;
import org.mockito.runners.MockitoJUnitRunner;
package com.daumcorp.be;
import org.apache.commons.lang.StringUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.internal.matchers.apachecommons.ReflectionEquals;
import org.mockito.runners.MockitoJUnitRunner;
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@karian7
karian7 / pom.xml
Last active August 29, 2015 13:56
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.daumcorp.maven.parent</groupId>
<artifactId>daum-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
package com.daumcorp.be;
import com.daumcorp.cafe.gravatar.Gravatar;
import com.daumcorp.cafe.gravatar.GravatarClient;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;