springBoot stepping on the pit record – continuous update ing

The following are the default configurations of springboot. If you modify the configuration file of springboot, it may not work. The role of the directory under the resources of springboot resources/templates Put the html file (it can only be accessed through the @RequestMapping jump of the control class) resources/static Put static resources such as css, js, img Pithole 1: After springboot starts, the @RequestMapping() annotation of the control class under the controller package cannot jump to the specified html page Reason one: The springboot startup class should be placed at the outermost of all packages Reason two: Springboot adheres to the principle that the agreement is greater than the configuration. After the project is started, the html page that jumps needs to be placed under the resources/templates directory to successfully jump. The files in this directory are protected and cannot be directly accessed through the web address. . Reason three: The @ResponseBody annotation is used on the jump method. After using this annotation, the returned information will be written as a string into the html body area, so the page to be redirected will be written into the body as a string. Pithole 2: static resources such as css, js,…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索