git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| 'use strict'; | |
| const Hapi = require('hapi'); | |
| const HapiSwagger = require('hapi-swagger'); | |
| const Models = require('./models'); | |
| const Routes = require('./routes'); | |
| const Pack = require('./package'); | |
| const Fixtures = require('sequelize-fixtures'); | |
| const server = Hapi.server({ |
| 'use strict'; | |
| const Models = require('../models'); | |
| const Joi = require('joi'); | |
| const Boom = require('boom'); | |
| module.exports = function () { | |
| return [{ | |
| method: 'GET', | |
| path: '/movies', |
| @ControllerAdvice | |
| public class CustomResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { | |
| @Override | |
| protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request) { | |
| List<FieldError> fieldErrors = ex.getBindingResult().getFieldErrors(); | |
| List<ObjectError> globalErrors = ex.getBindingResult().getGlobalErrors(); | |
| List<String> errors = new ArrayList<>(fieldErrors.size() + globalErrors.size()); | |
| String error; | |
| for (FieldError fieldError : fieldErrors) { |
| package com; | |
| import java.lang.reflect.Method; | |
| import java.util.List; | |
| import javax.servlet.http.HttpServletRequest; | |
| import org.apache.cxf.interceptor.Fault; | |
| import org.apache.cxf.message.Message; | |
| import org.apache.cxf.phase.AbstractPhaseInterceptor; |
| If you'd like to use a .jar file in your project, but it's not available in any Maven repository, | |
| you can get around this by creating your own local repository. This is done as follows: | |
| 1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag): | |
| <repositories> | |
| <repository> | |
| <id>in-project</id> | |
| <name>In Project Repo</name> | |
| <url>file://${project.basedir}/libs</url> |
Such independent inner transactions are for example used for id generation through manual sequences, where the access to the sequence table should happen in its own transactions, to keep the lock there as short as possible. The goal there is to avoid tying the sequence locks to the (potentially much longer running) outer transaction, with the sequence lock not getting released before completion of the outer transaction.
| import org.apache.axis.AxisFault; | |
| import org.apache.axis.Handler; | |
| import org.apache.axis.Message; | |
| import org.apache.axis.MessageContext; | |
| import org.apache.axis.SimpleChain; | |
| import org.apache.axis.SimpleTargetedChain; | |
| import org.apache.axis.configuration.SimpleProvider; | |
| import org.apache.axis.handlers.BasicHandler; | |
| import org.apache.axis.transport.http.HTTPSender; | |
| import org.apache.axis.transport.http.HTTPTransport; |
| import { Component, OnInit } from '@angular/core'; | |
| import { FormGroup, Validators, FormBuilder } from '@angular/forms'; | |
| @Component({ | |
| templateUrl: './form.html' | |
| }) | |
| export class Component implements OnInit { | |
| form: FormGroup; |
| import { Title } from '@angular/platform-browser'; | |
| import { NgModule } from '@angular/core'; | |
| import { InjectorModule } from './InjectorModule'; | |
| @NgModule({ | |
| ... | |
| ... | |
| imports: [ | |
| .. | |
| ... |