LoginSignup
3
2

More than 1 year has passed since last update.

SpringBootポートフォリオ作成

Last updated at Posted at 2021-06-07

理由・背景

SpringBootのポートフォリオを作成したいと思います。
テストが今回は非常に重要な要素です。

ハマったこと。

postgresのユーザーを使用してという意味
psql -U postgres
データベース使用
\c spring-demo
Grantなどもあるが一旦スルー
参考アドレス
https://zenn.dev/junki555/articles/de2c9844a1d101
データベースごとに違いについての比較
https://www.ashisuto.co.jp/tech-note/article/20141006_db.html

テーブル定義

スクリーンショット 2021-06-07 17.28.51.png

URL設計

スクリーンショット 2021-06-07 21.56.10.png

H2

application.properties
mybatis.configuration.map-underscore-to-camel-case=true
spring.datasource.url=jdbc:h2:mem:testdb

手順の確認

SpringoBootアプリケーション起動後
http://localhost:8080/h2console

事前準備

・不要ソース削除
・コードの整形
・知識の整理
Spring Data JPA (Java Persistence API)

Githubにあげる

・ライセンス
・クラスの名前を実態に即したものにする。
・targetは.gitignoreに入れてコミットしないようにする。
・mainにあげるようにする。

手順

・vi .gitignoreを作る。
・空のものをGithubに作ってからpushする。
・MITライセンスを付け加える。

AWS上にあげる

キーワード

ElasticBeanstalk

package
セキュリティ設定 ポート番号
RDS

application.yml
pom.xml

TakeAway&今後

画面遷移は気をつける
日付をつける
審査完了フラグをつける

アウトプット

http://springmybatis-env.eba-fb6zgdsj.ap-northeast-1.elasticbeanstalk.com/
https://github.com/noikedan/spring-mybatis-crud

感想

GITはいいGUIツールあれば使ったほうがいいような気がします。
https://samuraism.com/2020/10/01/11854

参考

注意:プロジェクト直下
vi .gitignore

target

*.class

echo "# springmybatisRest" >> README.md
git init
git add README.md
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/noikedan/springmybatisRest.git
git push -u origin main

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2