Skip to content

Instantly share code, notes, and snippets.

View diegosilva13's full-sized avatar
🎯
Focusing

Diego Brener diegosilva13

🎯
Focusing
View GitHub Profile
spring:
application:
name: delivery-order-service
cloud:
config:
uri: http://localhost:9090
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.coderef</groupId>
<artifactId>delivery-order-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
import { Component } from '@angular/core';
import {Environment} from "./decorators/environment.decorator";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
import {environment} from "../../environments/environment";
export function Environment(atributo: string ) {
return (target: any, key: string) => {
const descriptor = Object.getOwnPropertyDescriptor(target, key) || {};
descriptor.value = environment[atributo];
Object.defineProperty(target, key, descriptor);
};
}
export const environment = {
production: false,
title: 'My App'
};
<h1>
Welcome to {{title}}!
</h1>
function f() {
console.log("f(): evaluated");
return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
console.log("f(): called");
}
}
class C {
@f()
package com.coderef.delivery;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@SpringBootApplication
@EnableEurekaClient
public class DeliveryAuthServerApplication {
package com.coderef.delivery.service;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Optional;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
package com.coderef.delivery.repository;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import com.coderef.delivery.model.User;