mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 19:32:48 +00:00
Merge pull request #358 from arey
* pr/358: Polish "Add documentation for IntelliJ IDEA" Add documentation for IntelliJ IDEA
This commit is contained in:
commit
1ada9baeaa
1 changed files with 23 additions and 9 deletions
32
readme.md
32
readme.md
|
@ -40,30 +40,44 @@ You could start MySql locally with whatever installer works for your OS, or with
|
|||
docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8
|
||||
```
|
||||
|
||||
## Working with Petclinic in Eclipse/STS
|
||||
## Working with Petclinic in your IDE
|
||||
|
||||
### prerequisites
|
||||
The following items should be installed in your system:
|
||||
* Java 8 or newer.
|
||||
* git command line tool (https://help.github.com/articles/set-up-git)
|
||||
* Eclipse with the m2e plugin (m2e is installed by default when using the STS (http://www.springsource.org/sts) distribution of Eclipse)
|
||||
|
||||
Note: when m2e is available, there is an m2 icon in Help -> About dialog.
|
||||
If m2e is not there, just follow the install process here: http://www.eclipse.org/m2e/m2e-downloads.html
|
||||
|
||||
* Your prefered IDE
|
||||
* Eclipse with the m2e plugin. Note: when m2e is available, there is an m2 icon in Help -> About dialog. If m2e is not there, just follow the install process here: http://www.eclipse.org/m2e/
|
||||
* [Spring Tools Suite](https://spring.io/tools) (STS)
|
||||
* IntelliJ IDEA
|
||||
|
||||
### Steps:
|
||||
|
||||
1) In the command line
|
||||
1) On the command line
|
||||
```
|
||||
git clone https://github.com/spring-projects/spring-petclinic.git
|
||||
```
|
||||
2) Inside Eclipse
|
||||
2) Inside Eclipse or STS
|
||||
```
|
||||
File -> Import -> Maven -> Existing Maven project
|
||||
```
|
||||
|
||||
Then either build on the command line `./mvnw install` or using the Eclipse launcher (right click on project and `Run As -> Maven install`) to generate the css. Run the application main method by right clicking on it and choosing `Run As -> Java Application`. Visit [http://localhost:8080](http://localhost:8080) in your browser.
|
||||
Then either build on the command line `./mvnw generate-resources` or using the Eclipse launcher (right click on project and `Run As -> Maven install`) to generate the css. Run the application main method by right clicking on it and choosing `Run As -> Java Application`.
|
||||
|
||||
3) Inside IntelliJ IDEA
|
||||
|
||||
In the main menu, choose `File -> Open` and select the Petclinic [pom.xml](pom.xml). Click on the `Open` button.
|
||||
|
||||
CSS files are generated from the Maven build. You can either build them on the command line `./mvnw generate-resources`
|
||||
or right click on the `spring-petclinic` project then `Maven -> Generates sources and Update Folders`.
|
||||
|
||||
A run configuration named `PetClinicApplication` should have been created for you if you're using a recent Ultimate
|
||||
version. Otherwise, run the application by right clicking on the `PetClinicApplication` main class and choosing
|
||||
`Run 'PetClinicApplication'`.
|
||||
|
||||
4) Navigate to Petclinic
|
||||
|
||||
Visit [http://localhost:8080](http://localhost:8080) in your browser.
|
||||
|
||||
|
||||
## Looking for something in particular?
|
||||
|
|
Loading…
Reference in a new issue