――For various reasons, I created a Spring development environment. ――It was a break, but I was able to build it in a total of about 3 or 4 hours while fitting smoothly. ――I would like to continue to promote Spring-related activities in the future.
# | OS/software/Library | version |
---|---|---|
1 | Mac OS X | EI Capitan |
2 | Java | 1.8.0_111 |
3 | Tomcat | 8.0.43 |
4 | Eclipse | 4.5 Mars |
5 | Maven | 3.5.2 |
6 | Spring | 3.1.1.RELEASE |
brew update && brew upgrade && brew cleanup
Java
brew cask install java
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Tomcat
brew install tomcat
Maven
brew install maven
export M2_HOME=/usr/local/Cellar/maven/3.5.2/
export M2=$M2_HOME/bin
export PATH=$M2:$JAVA_HOME:$PATH
https://www.eclipse.org/downloads/packages/release/Mars/2
Place Eclipse.app under / Applications.
** Japanese localization plug-in ** http://mergedoc.osdn.jp/#pleiades.html
JStyle http://mergedoc.osdn.jp/#jstyle.html
Place the jp.sourceforge.mergedoc.pleiades directory of the unzipped plugin under /Applications/Eclipse.app/Contents/Eclipse/plugins/.
Open /Applications/Eclipse.app/Contents/Eclipse/eclipse.ini and add the writing.
-Xverify:none
-javaagent:/Applications/Eclipse.app/Contents/Eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar
JStyle
Place the unzipped plugin jar under /Applications/Eclipse.app/Contents/Eclipse/plugins/.
After starting, open the environment settings at the top left of the screen.
--From "Java> Compiler", change the Java version to 1.8. --Add Java SE 8 from "Java> Installed JRE". --Adjust the "General> JStyle" settings. --Set "General> Web Browser". --If proxy settings are required, set "General> Network Connection".
After booting, open "Server> Runtime Environment" from the Preferences at the top left of the screen.
/usr/local/Cellar/[email protected]/8.0.43/libexec
Open "Help> Install New Software" at the top of the screen.
Enter STS in the search window to install.
Open the Project Explorer from Window> Show View on the screen.
Set the following from the add button and install.
Maven
http://download.eclipse.org/technology/m2e/releases
Right-click on the project and open its properties.
--Change the Java version from "Java Compiler" to 1.8. --Add Java SE 8 from "Java Build Path".
--Introduction of Eclipse
There are many options for Eclipse, such as using various versions and Pleades directly, downloading from the original home or installing from Homebrew.
--How to make a project
At first, it was promoted from Maven project to Spring environment, but I wasn't sure because there are various setting methods. Also, it became much easier because I found a package that can create templates such as STS on the way.
--Tomcat runs normally
When I played around with it, the execution environment broke, and I didn't know where to play with it. It is good to erase the workspace and start over.
--How to resolve the dependency
I was lucky enough to know that I needed to install it using Maven, not just adding it to pom.xml.
--Differences between Spring, Spring MVC, Spring Boot, etc.
If you don't squeeze it properly when you check this area, it may fit.
--Difference between Maven and Gradle
I tried using Gradle, but do I have to set the xml by myself? Maven was all made of screen pops.
Recommended Posts