herokuでjavaのバージョン指定

古いplayアプリを動かしたかったんだけどjdkは1.7でないと動かない
でもデフォルトで1.8で動いてしまう

 

system.properties というファイルを作ってそこに

java.runtime.version=1.7

って書けばOK

https://devcenter.heroku.com/articles/java-support#specifying-a-java-version

stylesheetのドキュメント

cssのドキュメントを作りたい

stylesheetガイドで検索するといろいろと出てきた

どれが今時なのかいまいちわからない

 

・styledocco
https://jacobrask.github.io/styledocco/

・kss
http://warpspire.com/kss/

hologram
http://trulia.github.io/hologram/

・kaleistyleguide
https://github.com/thomasdavis/kaleistyleguide

・frontnote
https://github.com/frontainer/frontnote

・sc5styleguide
http://styleguide.sc5.io/

 

springbootをproductionで起動

    • mvn package
    • java -jar target/springboot_sample-1.0.0-SNAPSHOT.jar
      • こんなエラーが出たら
target/springboot_sample-1.0.0-SNAPSHOT.jarにメイン・マニフェスト属性がありません
      • pom.xmlにmainメソッドがあるクラスを指定する
<properties>
<start-class>your.package.App</start-class>
</properties>

javaでファイルをダウンロードしようとしたら日本語ファイル名が文字化ける

headerのContent-Dispositionにいろいろセットする

response.addHeader("Content-Disposition", "attachment; filename*=UTF-8''" + URLEncoder.encode(file.getName(), StandardCharsets.UTF_8.name()));

Spring Bootで日本語ファイル名のファイルダウンロード - システム開発メモ

 

半角スペースが+になってしまうのでreplaceしておく

.replace("+", "%20")

テックノート – 【Java】URLエンコード出来ない文字と対応方法