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
https://beroux.com/english/articles/kubernetes/?part=3 |
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 my.sample.resources; | |
import java.awt.image.BufferedImage; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; |
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 java.util.Arrays; | |
import java.util.Optional; | |
public class ReduceTest { | |
public static void main(String[] args) { | |
Optional<Sum> summary = Arrays.asList(new Sum(1, 10),new Sum(2, 15),new Sum(3, 5)).stream().reduce((sum1,sum2) -> { | |
if (Optional.ofNullable(sum1).isPresent() == false) { | |
System.out.println("Sum1 is empty."); | |
return sum2; |
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 jp.hoge; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.validation.Valid; | |
import javax.validation.constraints.NotNull; | |
import com.fasterxml.jackson.annotation.JsonProperty; |
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
plugins { | |
id 'java' | |
id 'com.github.johnrengelman.shadow' version '1.2.0' | |
} | |
apply plugin: 'java' | |
apply plugin: 'maven' | |
apply plugin: 'application' |
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
- hosts: '{{host_name}}' | |
sudo: yes | |
roles: | |
- common | |
- aws/common | |
- aws/amazon-linux-init |
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
ERROR [2015-02-27 11:01:38,781] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: ef46ad41b77903a3 | |
! com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hoge.hibernate_sequence' doesn't exist | |
! at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_20] |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | |
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd"> | |
<changeSet id="1" author="y.hoge"> | |
<createTable tableName="hoges"> | |
<column name="id" type="int(11)" autoIncrement="true"> | |
<constraints primaryKey="true" nullable="false" /> | |
</column> |
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 jp.hoge; | |
import org.skife.jdbi.v2.DBI; | |
import io.dropwizard.Application; | |
import io.dropwizard.db.DataSourceFactory; | |
import io.dropwizard.jdbi.DBIFactory; | |
import io.dropwizard.migrations.MigrationsBundle; | |
import io.dropwizard.setup.Bootstrap; | |
import io.dropwizard.setup.Environment; |
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
configurations { jmockit } | |
dependencies { | |
jmockit ('com.googlecode.jmockit:jmockit:1.7') | |
testCompile ('junit:junit:4.11') | |
} | |
test { | |
// jmockitがjunitよりも前にclasspathが通ってる必要があるので下記の対応を行っています |
NewerOlder