| 
									
										
										
										
											2013-06-03 17:54:58 +03:00
										 |  |  | ========= | 
					
						
							| 
									
										
										
										
											2013-07-02 13:54:41 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-18 12:48:44 +02:00
										 |  |  | ## REST Example Project with Spring Security
 | 
					
						
							| 
									
										
										
										
											2013-07-02 13:54:41 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-14 14:21:30 +03:00
										 |  |  | ### Relevant Articles: 
 | 
					
						
							| 
									
										
										
										
											2014-01-05 18:25:01 +02: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/) | 
					
						
							| 
									
										
										
										
											2014-01-05 19:35:19 +02:00
										 |  |  | - [HATEOAS for a Spring REST Service](http://www.baeldung.com/2011/11/13/rest-service-discoverability-with-spring-part-5/) | 
					
						
							| 
									
										
										
										
											2014-01-05 21:08:54 +02:00
										 |  |  | - [REST API Discoverability and HATEOAS](http://www.baeldung.com/2011/11/06/restful-web-service-discoverability-part-4/) | 
					
						
							|  |  |  | - [ETags for REST with Spring](http://www.baeldung.com/2013/01/11/etags-for-rest-with-spring/) | 
					
						
							| 
									
										
										
										
											2014-03-20 21:59:42 +02:00
										 |  |  | - [Error Handling for REST with Spring 3](http://www.baeldung.com/2013/01/31/exception-handling-for-rest-with-spring-3-2/) | 
					
						
							| 
									
										
										
										
											2014-05-16 22:49:47 +03:00
										 |  |  | - [Integration Testing with the Maven Cargo plugin](http://www.baeldung.com/2011/10/16/how-to-set-up-integration-testing-with-the-maven-cargo-plugin/) | 
					
						
							| 
									
										
										
										
											2016-02-08 11:58:55 +02:00
										 |  |  | - [Introduction to Spring Data JPA](http://www.baeldung.com/2011/12/22/the-persistence-layer-with-spring-data-jpa/) | 
					
						
							| 
									
										
										
										
											2016-02-08 12:13:41 +02:00
										 |  |  | - [Project Configuration with Spring](http://www.baeldung.com/2012/03/12/project-configuration-with-spring/) | 
					
						
							| 
									
										
										
										
											2013-07-14 14:21:30 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-02 13:54:41 +03:00
										 |  |  | ### Build the Project
 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | mvn clean install | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-18 12:48:44 +02: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 13:54:41 +03:00
										 |  |  | ### Use the REST Service
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | curl http://localhost:8080/spring-security-rest-full/foos | 
					
						
							|  |  |  | ``` |