Getting Users / Deployment, AWS SES Setup
Get List of USers
GET : localhost:8080/users?page=1&limit=50 (passed as url query parameter)
@RequestParam is more useful on a traditional web application where data is mostly passed in the query abatements
while @PathVariable is more suitable for RESTful web services where URL contains values
e.g. http://localhost:8080/book/9783827319333, here data, which is ISBN number is part of URI.
1. controller getUSers
2. service
3. repository
4. postman LOGIN -> GET with the above url WITH or WITHOUT limit
Deploying an app in remote server using maven
1. Go to properties after right clicking the project.
2. Check the loaction of the project
3. In your Command line, go to the above location ex) cd D:\t-projects\je\workspace\firstProject
4. type 'dir' to list the files contained. you should see 'pom.xml' in the root folder of the project, which means
you can use maven command to run the app without using spring tool suite
5. mvn install -> to build a project and also run unit tests
6. mvn spring-boot:run -> to run your Restful web service application in apache tomcat server container
(to terminate the app) ctrl + C
Create context path to your web service to specify whcih application it targets (all exisitng mapping stays same
1. server.servlet.context-path=/my-restful-web-app in application.properties
Run your app as java application (How to take a jar file and run it as a standalone java app)
(upload the deployable jar file to a production server)
mvn install -> creat jar(deploable file) inside targer. Jar file is executable and can be used to run an app as java app
1. go to target folder, and move firstProject-0.0.1-SNAPSHOT.jar /Desktop
2. type : java -jar firstProject-0.0.1-SNAPSHOT.jar in cmd
1. create topic sns
2. subscription ses
3. create case under setting
Moving out of AWS SES sandbox
1. https://console.aws.amazon.com/sns and create topic
2. bounces
Create AWS IAM (Identity and Access Management) Acess Credentials
- Add User with new Group
- copy keys
Creating Shared credentials file (to load access details and get authenticated by AWS)
-Create credentials file
and save it in C:\Users\USERNAME\.aws\credentials
(Do not include a file exgtension when saving the credentials file
Add AWS Java SDK SES Maven dependency in Pom.xml
» aws-java-sdk-ses
Comments
Post a Comment