Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of SSM configuration thoroughly by Java Spring Boot

Shulou Source: shulou.com Published: 2022-06-02 20:16:20 11月01日 Update

Java Spring Boot how to completely solve the SSM configuration problem, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, there are people who need this can learn, I hope you can gain something.

Create projects directly with IDEA

1) Create a new project

2. Choose spring initializr

Select Initialize Component Web

Waiting for the project to build successfully

Create a HelloController class under the com.longdi.helloworld package

package com.longdi.helloworld.controller; import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RestController; /** * @author: Longdi * @description * @date: 2021/9/29 13:03 */@ RestControlpublic class HelloController { //Interface:http://localhost:8080/hello @RequestMapping("hello") public String hello(){ //invoke service and receive front-end parameters return "hello world"; }}

project structure

Launch the project and display HelloWorld! in your browser.

http://localhost:8080/hello

It only takes a few steps to complete the development of a web interface. SpringBoot is that simple.

Make the project into jar package, click maven package

If the package is successful, a jar package will be generated under the target directory.

Once the jar package is ready, it can run anywhere!

How to change the letters displayed at startup, that is, the banner pattern

Just one step: create a new banner.txt in the resources directory under the project.

SpringBoot is so easy to operate

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Tags: Project success interface directory help selection question configuration clarity business that is content front end parameters just available in pattern place letters characters Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Redmi Microsoft Shulou Technology OPPO Reno