LoginSignup
0
0

More than 3 years have passed since last update.

【Spring Boot】 Registration and Login with MySQL Database, Bootstrap and HTML5, Spring Security

Last updated at Posted at 2021-02-14

今回のプロジェクトでは、Spring Securityを使っています:closed_lock_with_key:

学べたこと

:star: Junitテスト
:star: pom.xmlにbootstrap用のdependencyを記述 (参考URL:https://mvnrepository.com/artifact/org.webjars/bootstrap)
:star: HTML5によるvalidationの記述方法
:star: Hibernateを使ってデータベースに自動でテーブルを作成する方法 (⇦これは、チョー便利です:sparkles::sparkles:

参考動画

IMAGE ALT TEXT HERE
YouTube:https://youtu.be/aRLoSDOlU3w

Software programs

Spring Tool Suite 4
Bootstrap
MySQL Database server

完成:gift:

2021-02-15_05h23_35.gif

まとめ

Spring Securityを使う上で、新たな概念がいくつか増えました:seedling:

それが今回登場した
  :star: UserDetailsクラス
  :star: UserDetailsServiceクラス
  :star: WebSecurityConfigurerAdapterクラス
  :star: BCryptPasswordEncoderクラス

達です:bangbang:

あと、Junitテストに登場したアノテーションです:closed_lock_with_key:
  @DataJpaTest
  @AutoConfigureTestDatabase(replace = Replace.NONE)
  @Rollback(false)
  @test

これらの役割を一通り理解すれば、オリジナルで簡単なログイン機能の実装もできそうです:muscle:

次回は、

次は、ReactとSpringBootを連携させて、フルスタックアプリケーションにトライしてみたいと思います
【React.Js and SpringBoot】➡ https://qiita.com/iwasaki-hub/items/089a57e8529fc0576094

0
0
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
0
0