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 echo; | |
| import org.vertx.java.core.Handler; | |
| import org.vertx.java.core.app.VertxApp; | |
| import org.vertx.java.core.buffer.Buffer; | |
| import org.vertx.java.core.net.NetClient; | |
| import org.vertx.java.core.net.NetSocket; | |
| /** | |
| * @author Keesun Baik |
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 http; | |
| import org.vertx.java.core.Handler; | |
| import org.vertx.java.core.app.VertxApp; | |
| import org.vertx.java.core.http.HttpServer; | |
| import org.vertx.java.core.http.HttpServerRequest; | |
| /** | |
| * @author Keesun Baik | |
| */ |
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
| # Define how Bash prompt looks like: | |
| # | |
| # Cli Colors | |
| export CLICOLOR=1 | |
| # use yellow for dir's | |
| export COLOR_NC='\033[0m' # No Color | |
| export COLOR_WHITE='\033[1;37m' | |
| export COLOR_BLACK='\033[0;30m' | |
| export COLOR_BLUE='\033[0;34m' |
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
| repositories { | |
| mavenCentral() | |
| maven { | |
| url "http://repo.mycompany.com/maven2" | |
| } | |
| } |
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
| s = 'Keesun'; | |
| puts "Hello #{s}, #{2000 + 12}" | |
| if(true) then | |
| puts "Puss int the Boots" | |
| end | |
| class Company | |
| $founder = "Toby" |
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
| class Things | |
| @@count = 0 | |
| attr_accessor(:id, :name) | |
| def initialize(id, name) | |
| @id = id; | |
| @name = name; | |
| @@count += 1 | |
| end |
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 cors; | |
| import org.springframework.web.servlet.ModelAndView; | |
| import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| /** | |
| * @author Keesun Baik |
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
| <dependency> | |
| <groupId>javax.servlet</groupId> | |
| <artifactId>javax.servlet-api</artifactId> | |
| <version>3.0.1</version> | |
| </dependency> |
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 FlashAPI { | |
| @Test | |
| public void makeFlashMap(){ | |
| FlashMap fm = new FlashMap(); | |
| fm.put("message", "hi"); | |
| fm.setTargetRequestPath("/user/list"); | |
| fm.startExpirationPeriod(10); | |
| } |
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 SampleWebAppInitializer implements WebApplicationInitializer { | |
| @Override | |
| public void onStartup(ServletContext servletContext) throws ServletException { | |
| AnnotationConfigWebApplicationContext ac = new AnnotationConfigWebApplicationContext(); | |
| // ac.register(AppConfig.java); | |
| ServletContextListener listener = new ContextLoaderListener(ac); | |
| servletContext.addListener(listener); | |
| AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); |