2013-06-03 10:54:58 -04:00
|
|
|
=========
|
2013-07-02 06:54:41 -04:00
|
|
|
|
2013-12-18 05:48:44 -05:00
|
|
|
## REST Example Project with Spring Security
|
2013-07-02 06:54:41 -04:00
|
|
|
|
|
|
|
|
2013-07-14 07:21:30 -04:00
|
|
|
### Relevant Articles:
|
2014-01-05 11:25:01 -05:00
|
|
|
- [Spring Security Expressions - hasRole Example](http://www.baeldung.com/spring-security-expressions-basic)
|
|
|
|
- [REST Pagination in Spring](http://www.baeldung.com/2012/01/18/rest-pagination-in-spring/)
|
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
|
|
|
|
|
|
|
|
```
|
|
|
|
curl http://localhost:8080/spring-security-rest-full/foos
|
|
|
|
```
|