2013-06-03 10:54:58 -04:00
|
|
|
=========
|
2013-07-02 06:54:41 -04:00
|
|
|
|
2017-10-25 12:39:04 -04:00
|
|
|
## REST Example Project with Spring
|
2013-07-02 06:54:41 -04:00
|
|
|
|
2016-06-28 05:37:34 -04:00
|
|
|
### Courses
|
|
|
|
The "REST With Spring" Classes: http://bit.ly/restwithspring
|
2016-06-28 05:38:19 -04:00
|
|
|
|
2016-08-12 10:02:35 -04:00
|
|
|
The "Learn Spring Security" Classes: http://github.learnspringsecurity.com
|
2013-07-02 06:54:41 -04:00
|
|
|
|
2013-07-14 07:21:30 -04:00
|
|
|
### Relevant Articles:
|
2018-05-02 03:41:09 -04:00
|
|
|
- [Integration Testing with the Maven Cargo plugin](http://www.baeldung.com/integration-testing-with-the-maven-cargo-plugin)
|
2018-05-06 09:45:23 -04:00
|
|
|
- [Project Configuration with Spring](http://www.baeldung.com/project-configuration-with-spring)
|
2016-02-10 06:42:54 -05:00
|
|
|
- [Metrics for your Spring REST API](http://www.baeldung.com/spring-rest-api-metrics)
|
2018-12-14 16:12:54 -05:00
|
|
|
- [Spring Security Expressions - hasRole Example](https://www.baeldung.com/spring-security-expressions-basic)
|
2017-04-18 16:20:20 -04:00
|
|
|
|
2013-07-14 07:21:30 -04:00
|
|
|
|
2013-07-02 06:54:41 -04:00
|
|
|
### Build the Project
|
|
|
|
```
|
|
|
|
mvn clean install
|
|
|
|
```
|
|
|
|
|
2013-12-18 05:48:44 -05:00
|
|
|
|
|
|
|
### Set up MySQL
|
|
|
|
```
|
|
|
|
mysql -u root -p
|
|
|
|
> CREATE USER 'tutorialuser'@'localhost' IDENTIFIED BY 'tutorialmy5ql';
|
|
|
|
> GRANT ALL PRIVILEGES ON *.* TO 'tutorialuser'@'localhost';
|
|
|
|
> FLUSH PRIVILEGES;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2013-07-02 06:54:41 -04:00
|
|
|
### Use the REST Service
|
|
|
|
|
|
|
|
```
|
2018-07-17 12:26:01 -04:00
|
|
|
curl http://localhost:8082/spring-rest-full/auth/foos
|
2013-07-02 06:54:41 -04:00
|
|
|
```
|