Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to customize a drawing bed management tool using Spring Boot+Thymeleaf

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to use Spring Boot+Thymeleaf to customize a picture bed management tool, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.

Preface of SpringBoot + OSS Service Custom Picture bed

Under the epidemic, every day is gluttonous and lazy! Anyway, there was nothing to do at home, so I spent a day writing this simple project. In fact, I was going to continue to improve, and then deploy to my own cloud server as my own photo album. Later, I was too lazy to write the front end, so I left some agents.

Although the project is small, but it has five organs, it can be used as a tool directly. Although the code is written hastily, there should be no big problem on the whole, and beginners can also learn it directly.

In general, this project can mainly provide you with this help:

Oss is very commonly used as a graphic bed service, simple encapsulation and understanding will help you to use it in the future; the technology stack uses SpringBoot and thymeleaf template engine, and the front-end framework uses layui, which is highly praised in China. This project can take you through the process of front and back development.

I can write React and Vue, but considering that most of the back-end friends have not been in contact with each other, I just use thymeleaf to do it. In other words, this is the first time to use layui! All follow the layui official website to find the gourd painting ladle step by step to write the front page.

Effect display. "

The page is ugly. I don't spend much time on this. I'll take a look at it.

"

Upload page

Uploaded successfully

Technology stack back end: Spring Boot front end: thymeleaf template engine + layui framework

React and Vue have written before, this is the first time to use thymeleaf plus layai to develop the front end, generally speaking, I still like React a little more.

Start the project

1. Clone to local

Git clone git@github.com:Snailclimb/springboot-aliyun-oss.git

two。 Open the project using idea or other development tools

3. Add application.yml as follows:

"

Ps: I ignored application.yml when I submitted with git, so you need to manually add it to your local area.

"spring:

Servlet:

Multipart:

Max-file-size: 10MB

Max-request-size: 10MB

Thymeleaf:

# disable the caching of thymeleaf, otherwise the modified page will not take effect immediately during development and need to be restarted. Production can be configured as true

Prefix: classpath:/web/

Cache: false

Suffix: .html

Aliyun:

Oss:

Bucket-name: my-blog-to-use

Endpoint: oss-cn-beijing.aliyuncs.com

Access-key-id: replace it with your key id

# Alibaba Cloud's main account AccessKey has access to all API, which is very risky. It is recommended to create and use a RAM account for API access or daily operation and maintenance. Log in to https://ram.console.aliyun.com to create a RAM account.

Access-key-secret: replace it with your key secret

File-host: test

4. Just run the project!

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

  • Maven is configured with version packages in different environments.

    Maven provides rich plug-ins. This article explains the steps of packaging maven plug-ins: the pom.xml file is as follows:

    © 2024 shulou.com SLNews company. All rights reserved.

    12
    Report