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
| @Bean | |
| public WebMvcRegistrations mvcRegistrations() { | |
| return new WebMvcRegistrations() { | |
| @Override | |
| public RequestMappingHandlerAdapter getRequestMappingHandlerAdapter() { | |
| return new ExtendedRequestMappingHandlerAdapter(); | |
| } | |
| }; | |
| } |
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
| [{"id":1,"book_title":"Douglas","isbn":"429571064-4"}, | |
| {"id":2,"book_title":"Edward","isbn":"354976882-6"}, | |
| {"id":3,"book_title":"Ashley","isbn":"243479125-5"}, | |
| {"id":4,"book_title":"Gregory","isbn":"824118644-4"}, | |
| {"id":5,"book_title":"Scott","isbn":"873681970-0"}, | |
| {"id":6,"book_title":"Benjamin","isbn":"146529795-2"}, | |
| {"id":7,"book_title":"Wayne","isbn":"534416261-8"}, | |
| {"id":8,"book_title":"Susan","isbn":"382383221-2"}, | |
| {"id":9,"book_title":"Keith","isbn":"895009173-9"}, | |
| {"id":10,"book_title":"Steven","isbn":"248842877-9"}, |
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
| { | |
| "teasers": [ | |
| { | |
| "format": { | |
| "id": "trust_us_teaser" | |
| }, | |
| "tile1": { | |
| "text": "Versandkostenfrei ab €19,95", | |
| "targetLink": "http://www.galeria.de" | |
| }, |
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
| <style> | |
| div.container { | |
| width: 60%; | |
| margin: 30px auto; | |
| font-family: Verdana, Geneva, Tahoma, sans-serif; | |
| font-size: 12px; | |
| background-color: #888; | |
| padding: 10px; | |
| } | |
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
| final ScheduledExecutorService exec = Executors.newScheduledThreadPool(1); | |
| exec.schedule(new Runnable() { | |
| @Override | |
| public void run() { | |
| System.out.println("=================> Running"); | |
| myFunction(); | |
| } | |
| }, 5, TimeUnit.SECONDS); |
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 GeoGoogleTest { | |
| final static String PROXY_SERVER = "myproxy.com"; | |
| final static int PROXY_PORT = 80; | |
| private static GeoAddressStandardizer createGeoAddressStandardizer() { | |
| final HttpClientParams httpClientParams = new HttpClientParams(); | |
| final HttpClient httpClient = new HttpClient(httpClientParams); | |
| //enable these 3 lines if you are behind a proxy server. | |
| /* |
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 SeleniumTest { | |
| private final static String BASE_URL = "http://localhost:8080"; | |
| private final static WebDriver driver = new FirefoxDriver(); | |
| @Before | |
| public void startUp() { | |
| driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); | |
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
| private ExpectedCondition WaitForAjax(final long timeout) { | |
| return new ExpectedCondition() { | |
| public Boolean apply(WebDriver driver) { | |
| final long startTime = System.currentTimeMillis(); | |
| final JavascriptExecutor javascriptExecutor = (JavascriptExecutor) driver; | |
| while ((startTime + timeout) >= System.currentTimeMillis()) { | |
| final Boolean scriptResult = (Boolean) javascriptExecutor.executeScript("return jQuery.active == 0"); | |
| if (scriptResult) |
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
| @Data | |
| @XmlRootElement(name = "book") | |
| @XmlAccessorType(XmlAccessType.FIELD) | |
| public class Book { | |
| @XmlElement(name = "title") | |
| private String name; | |
| private String author; | |
| private String publisher; | |
| private String isbn; | |
| } |