I'm building a blog website in Spring Framework with java and I want my posts to be shown from a database dynamicly (mysql).
Question: Can I store the whole article into the database to reduce the mass file creation for every article and produce it
1) Yes it is possible. Spring has a pagination feature that allows you to retrieve "n" number of items per page. You can see an example here REST API PAGINATION
2) You can store the whole article in the database using the type TEXT
(or VARCHAR(MAX)
if using mssql)
3)Upload the image to your server directory and call the url on your web pages. For example, if the name of your website is http://example.com you can create an /image
folder and upload your image here. So if the name of your image is test.png
, in your article stored in your db, it'll will contain the html text <img src="http://example.com/image/test.png"/>
(this will probably be escaped in your db)