SpringBoot study notes (a) - Construction of the project springboot

 


 

The project generated a SpringBoot

Development and learning SpringBoot need to generate a good SpringBoot project.

1, may be used a number of the IDE (the Integrated Development Environment, integrated development tools) to generate, for example IDEA .

2, Spring also can go directly to the official website ( Portal on) download directly generated by the project.

 

 

I tried two ways, discover generated directory structure are similar, the main use is that you generated pages, I want to use the need to import in IDEA, as to how to import. . . . . . Ask degree of your mother chant. . .

Here is an example of using the web version generation projects.


 

Project generation

1, Go to web address

https://start.spring.io/

 

 

 

 

2, introduce contents above it

  • project --- use that to build tools to build your project. Maven can be selected or Gradle. Here is a selection of Maven, with his can help you automatically introduce some dependencies, such as your project need to introduce fastjson.jar package, as long as the configuration at the configuration file will help you automatically imported.
  • Language --- what kind of development language, the amount of use. . . Only java.
  • Spring Boot --- here's selection generated version SpringBoot. Where the largest number (no SNAPSHOT) is the latest official version, generally choose this version, which means that this version is not going to change, the first time you load, maven will detect that you have no local package, if not go back and download one if you do not have to download, use local. And if you use a snapshot version (SNAPSHOT), then every time you build the project when maven remote repository would go check, this snapshot version is not a change, there is no one to submit new code like ah, if there is re download.
  • Porject Metadata --- here to fill in the names of some major projects, those organizations. This is not even a combination of stuff is called "coordinates", is to determine the uniqueness of your project if you develop a toolkit to upload maven repository, someone you want to use this project, will pass these two things referenced in the maven. Here are a Gangster explanation ( portal ).
  • As Project Matadata inside of the Options is like this (below) to see the name to know is do you mean, what a role. Packaging project that is to be packaged into what, if it is a general toolkit can choose jar, if a web project selection war.
  •  

    Dependencies --- here to add some dependencies. For example, you need to use a plug-in Lombok, for example, you want to use springweb web development projects. Your selected last will be added to the pom.xml file. (If previously the case, but also to the remote repository to search, there is concern version of the problem, and then add your own pom.xml file manually to go inside, all right now, springboot are somehow help me, get away with. As for To add later, you can also manually add them again.)

3, click on the green button Generate can generate project. Items will be downloaded to the local.

 


 

 Project directory structure under the next generation of note-taking.

Guess you like

Origin www.cnblogs.com/Eastry/p/12158940.html