This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARN [2015-08-25 18:04:32,716] com.netflix.config.sources.URLConfigurationSource: No URLs will be polled as dynamic configuration sources. | |
Exception in thread "main" org.apache.commons.configuration.ConversionException: 'graphite.port' doesn't map to an Integer object | |
at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:848) | |
at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:809) | |
at com.odesk.agora.configuration.ConfigurationFactory.processConfiguration(ConfigurationFactory.java:275) | |
at com.odesk.agora.configuration.ConfigurationFactory.processConfiguration(ConfigurationFactory.java:400) | |
at com.odesk.agora.configuration.ConfigurationFactory.build(ConfigurationFactory.java:178) | |
at com.odesk.agora.command.ConfiguredCommand.parseConfiguration(ConfiguredCommand.java:75) | |
at com.odesk.agora.command.ConfiguredCommand.run(ConfiguredCommand.java:58) | |
at com.yammer.dropwizard.cli.Cli.run(Cli.java:53) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usage: java -jar service-1.0.0-SNAPSHOT.jar | |
[-h] [-v] {server,embedded-server,o2server,o2configuration,db} ... | |
positional arguments: | |
{server,embedded-server,o2server,o2configuration,db} | |
available commands | |
optional arguments: | |
-h, --help show this help message and exit | |
-v, --version show the service version and exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Lock{ | |
private boolean isLocked = false; | |
public synchronized void lock() | |
throws InterruptedException{ | |
while(isLocked){ | |
wait(); | |
} | |
isLocked = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyWaitNotify{ | |
String myMonitorObject = ""; | |
boolean wasSignalled = false; | |
public void doWait(){ | |
synchronized(myMonitorObject){ | |
while(!wasSignalled){ | |
try{ | |
myMonitorObject.wait(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
private Object lock = new Object(); | |
public void doWait(){ | |
synchronized(lock){ | |
try{ | |
System.out.println("Start waiting"); | |
lock.wait(); | |
System.out.println("End waiting"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:security="http://www.springframework.org/schema/security" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd | |
http://www.springframework.org/schema/security | |
http://www.springframework.org/schema/security/spring-security-3.1.xsd"> | |
<security:global-method-security pre-post-annotations="enabled" secured-annotations="enabled"/> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.ivanursul.security; | |
import java.io.IOException; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import org.springframework.security.core.AuthenticationException; | |
import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kb.service.order; | |
import com.kb.domain.company.Company; | |
import com.kb.domain.enums.CompanyType; | |
import com.kb.domain.enums.PaymentStatus; | |
import com.kb.domain.order.Order; | |
import com.kb.domain.order.OrderStatus; | |
import com.kb.domain.outlet.Outlet; | |
import com.kb.repository.order.OrderRepository; | |
import com.kb.repository.outlet.OutletRepository; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'idea' | |
repositories { | |
mavenLocal() | |
mavenCentral() | |
} | |
dependencies { | |
compile 'joda-time:joda-time:2.3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello; | |
public class Greeter { | |
public String sayHello() { | |
return "Hello world!"; | |
} | |
} |