Spring boot app
[Link]
[Link]
application start
shortcuts - eclipse/sts
controller autowire on service layer autorwire on dao layer
localhost:7878/subject/name=file
@pathvariable and @requestparam
@requestbody - to convert json into java object
@responsebody - @restcontroller -> it converts java object into json
@restcontroler - @requestbody + @controller
@controller
@RequestMapping
@Autowired
controller - service - dao
Depency injection
@ComponentScan -
@autowire
spring restful services,
spring data jpa
filters on top jdbc - to connect with DB
daointerface extends JpaRepository - connect with mysqldb
- needs mysql dependency and its properties
[Link](id);
findOne() - select * from Subject where id = ?
update subject where value ( )
select * from subject
[Link]/friends/17
@restcontroller - entry and exit - json format ( srping rest services ) soan , rest
@controller - entry xml or json( @requestbody )- @xml @
crud operations
insert - postmapping
update - Putmapping
delete - deletemapping
get - getmapping
interface - courier service
service()
bus class - impl course serivce
service() {
// courier
}
train class -
air bus class -
debugging in spring boot
F6 - line by line execution
F8 - to complete flow execution until next bp
F5 - get into method() ( first line )
UI - > Request - > controller layer ( entry point ) -> service ( bussiness logic -
students who are active )-> Dao ( this is mediator - connection to db or api )->
DB/API ( filter like postitive fb - fb ) -
dao ( call one db which has all feebacks )
postman : only local
FB :
{
username : "test",
password : "pwd"
}
what was your flow of project ?
[Link] - Grid wall -> product page details is also one prject ->
Smileback project - srinbg boot project we can one api to collect all feedback
information - we call third party api is from clinets side
spring boot
size
core components - spring mvc
sprinv aop, spring core
defaulty - embeded tomcat server - jboss
first exlucde tomcat server
db
mvn Build ( clean install ): java files will converted into .class files ,
[Link]-> .jar file defaulty but real time app we create .war file
Deploy : deploy .war file in server
Jenkins pipeline :
git
general when push code changs - create jenkins pipeline -> build QA server STG
Preprod server PRODUCTION server
Rest & soap
Json xml and also json or xml
Spring boot - spring restful services
@RestController - @Controller