-01 towering building a stage, the primary foundation - Chapter 3 registered user login module development -3-11 implement user login

From the service think this layer controller to write.
Sign up and landed return the objects currently Users

Implementation class

Queries using transactions, Supports. andUqualTo add more than one query.

controller

When landing confirm the password is not necessary. So required to false



for MD5 password encryption. There is an exception needs to be thrown.

Directly above thrown

if can not find any. Throw an exception.

Restart test

maven install. Api then restart the service.







Front-end test

Deliberately enter the wrong password




right after landing jumps to the home page.

Source distal business logic





The following is a registered logic, and landing is similar


to demonstrate the effect. Here add a breakpoint.






We want to get that data object.


F10 to go down.


Press F8 to jump to the home page

to register and log in on the preparation is completed.

End

 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/12083176.html