Skip to content

Instantly share code, notes, and snippets.

View chrisegb's full-sized avatar
🏠
Working from home

Christian Blanco chrisegb

🏠
Working from home
View GitHub Profile
@chrisegb
chrisegb / AmazonService.java
Last active October 26, 2022 02:24
This is a Spring Boot Service class that uses an Amazon dependency added from Maven.
package com.your.package;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ResourceLoader;
@chrisegb
chrisegb / AmazonMavenDependency.xml
Last active October 1, 2022 00:00
This is the corresponding dependency to add into Maven file pom.xml that will interact with the latest AmazonService.java Service.
<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-s3 -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.12.313</version>
</dependency>
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http'
@Injectable({
providedIn: 'root'
})
export class ApiService {
BASE_URL = "https://limitless-beach-92120.herokuapp.com/";
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import {ViewEncapsulation} from '@angular/core';
import { ApiService } from '../api.service';
@Component({
selector: 'app-post-single',
templateUrl: './post-single.component.html',
styleUrls: ['./post-single.component.css'],
encapsulation: ViewEncapsulation.None,
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
public class RegisterRequest {
private String name;
private String userName;
private String email;
private String password;
public class RegisterResponse extends Response{
private Long idUser;
private String name;
private String userName;
private String email;
public class Response {
private boolean success;
private String message;
public String getMessage() {
return message;
}