Support auto-configuration class for spring boot #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I will suggest to add the auto configuration class for spring boot !
そして以降は、日本語で。
ども〜。久々にMixer 2にcontributeしてみよう。(JJUGのスライド見てふとw)
(2つBean定義すればよいだけなので、作る必要はない気はしたけど)Spring BootのAuto Configurationクラスつくってみました。 Mixer 2も推奨構成で作れば設定レスだよ〜的な。
デフォルト値はリファレンスの設定値を参考にしましたが、templateファイルを格納するパスどうしようかな〜と少し悩みました。Spring Boot的にはclasspath:/templates/だしな〜と。
あ〜あと、非Boot環境で誤作動しないかちょっと不安・・・。
ほんとは別プロジェクトの方がいいのかもしれないですが、いったん本家に混ぜ込んでPRしてみました。
ちなみに・・・Mixer 2って
ResourceUrlEncodingFilter
との連携(静的リソースへのURLとかにバージョンをつけられるやつ)ってサポートしてます?。もしサポートしてるなら、ResourceUrlEncodingFilter
のBean定義も自動で定義してあげるとよさそう。そのまま取り込んでもらうつもりでPRしてないんで、Auto Configurationサポートするなら参考にして頂ければ幸いです!!
ではでは。