Simple to share with you to quickly build a simple Spring Boot project, if there is wrong or this wrong place please also more guidance to communicate and learn together.

1. Create a Spring Boot project. Open the development tool IntelliJ IDEA (mine is 15.0.2), click File >New>Module, select your JDK (mine is 1.8), default next step.

Write the project name as prompted. Package version. Click Next.

Choose project dependencies and The Spring Boot version, because I am an Oracle database so there is no choice to choose according to their own needs.

Fill in your project name and path next.

The directory structure is as follows

Add the following dependencies and oracle database drivers to the POm file (I’m using Oracle here)

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc8</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId>  <scope>test</scope> </dependency>Copy the code

Introducing Maven dependencies

<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId>  </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> < version > 3.1.0 < / version > < / plugin > < plugin > < groupId > org.. Apache maven. Plugins < / groupId > <artifactId>maven-surefire-plugin</artifactId> <configuration> <testFailureIgnore>true</testFailureIgnore> </configuration> </plugin> </plugins> </build>Copy the code

Application. The properties of the configuration

Port =8089 server.tomcat.uri-encodeing= utf-8 Server.servlet. context-path=/springBoot_demo # database configuration is available if the direct access bean is not configured spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver spring.datasource.url=jdbc:oracle:thin:@loaclhost:1521:ORCL spring.datasource.username=demo Spring. Datesource. Password = demo # spring boot view configuration. Spring MVC. The prefix = / WEB - INF / # static file access configuration spring.mvc.static-path-pattern=/static/**Copy the code

3. Create a static folder in the Resources folder and place the js, CSS, and other static files in the webApp folder. Create a web-INF folder and put the JSP files under web-INF. Create the testbean.java file

Click the Maven Projects option on the right to find Spring-boot: Run

Right-click to create a boot option. The next boot option can be directly launched in the upper right corner. Start the project

Open a browser data access path http://localhost:8089/springBoot_demo/testBean/testDemo springBoot_demo: testBean configuration item in the configuration file name: The testbean.java access name created above is testDemo: the access method to be tested