I first encountered SpringBoot when I was researching a company and wondered what it was. Anyway good! So, I'm not good at java at all, but should I touch it? I thought, I referred to various URLs and started construction.
I will post for the first time. If you have any deficiencies, please contact us.
A level that even Hello World cannot do. I did my best and it worked, so I thought I would share it for those who are stumbling at the entrance with similar thoughts.
Windows 10 64bit
For SpringBoot, it seems that STS, which has eclipse and the execution environment attached, is convenient.
――I downloaded STS4 from the following URL.
The file name was as follows. spring-tool-suite-4-4.1.2.RELEASE-e4.10.0-win32.win32.x86_64.zip
--I created a folder called sts directly under the C: drive. --The zip file you downloaded earlier is stored in the sts folder. --Unzipped the zip file in the sts folder.
If you execute SpringToolSuite4.exe in this state, the following error will be output.
When I googled with this error, it says that java is not installed.
If you take a closer look,
If you place java in this location, you can start it ...? I thought.
I had vague knowledge that the JRE was an executable version in the java runtime, so I'll try to install it. However, if you simply install java, it will conflict with other environments and will be upgraded every time! Version upgrade! I had a noisy image, so I decided to unzip it and place it in the path mentioned above. Since STS is 64bit version, java is also 64bit version. I couldn't find the JRE for some reason, so download the JDK from the URL below. (I'm sorry if it's bad ...)
The downloaded file name is as follows. jdk-11.0.2_windows-x64_bin.zip
Follow the steps below to place this file in the path referenced by STS above.
--Place the downloaded zip file in C: \ sts \ sts-4.1.2.RELEASE.
--Unzip the placed zip file.
--When you unzip it, a folder called "jdk-11.0.2" will be created.
Rename the "jdk-11.0.2" folder to "jre".
You should now be able to launch SpringToolSuite4!
--Click File> New> Spring Starter Project --Next as it is --Check the following and go to the next - Template Engines - Thymeleaf - Web - Web
A progress bar will appear at the bottom right of the screen, so wait for a while.
Launch the demo application you created.
--Right click on the project> Run As> Spring Boot App
I get the following error ...
Exception in thread "main" java.lang.Error: Unresolved compilation problem: String cannot be resolved to a type at com.example.demo.DemoApplication.main(DemoApplication.java:9)
Right click on the project> Run As> Spring Boot App
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.3.RELEASE) ~(abridgement)~ DemoApplication in 2.981 seconds (JVM running for 4.501)
I was able to start!
Initially, I was trying with STS 3.9.7, and when I came across this event, I thought about posting it on Qiita and tried to reproduce it, but it went well with STS 4 series. So, when I tried it again, I reproduced it, and when I tried it in the same way as STS 3.9.7, it worked. It would be easy if java was installed, but I wanted to do something by force, so it became like this.
At the time of STS 3.9.7, Maven sometimes got in the way and it didn't work, but I was able to solve it by the following procedure according to the contents of this page.
――Close STS once
--Delete the `` `C: \ Users \