Home > Net >  How create front end on Spring?
How create front end on Spring?

Time:04-06

I'm a beginner, please don't swear and don't be nervous. I implemented a simple CRUD with the users table, I send a request and get a response in JSON, how do I connect the front-end to it? I have searched most of the sites related to this topic, but there are servlets all the time, can you please implement/help to implement them step by step Ex.:index.html (as I understand it, I will create this file in the static folder? but how to access the file?) where all users will be shown. Below I attach 2 links , with git and with spring implementations with dependencies that I use structure of project

CodePudding user response:

The default templating engine in Spring is Thymeleaf (just an option) https://www.thymeleaf.org/doc/tutorials/3.0/thymeleafspring.html

Also you can create standalone SPA applcation using some JS frameworks like Angular https://angular.io/

Since you have statet you are a beginner, probably it will be easier for you to go with the first option.

CodePudding user response:

first a fall you should clear about your application(web application or api based application etc) then design your controller. If you search front-end application in spring boot on google you will get multiple result with multiple site(ex- https://www.journaldev.com/, https://www.javainuse.com/, etc) if you new i recommending javatpoint for more details

CodePudding user response:

Front and back end separation.

Generally speaking, in real world, we just create another front end project (you can use framework like vue,react in JS) . it will use CURD interface , just like you create in controller Class. then you will process json data (CRUD interface return ) and display on website .

  • Related