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
| @Configuration | |
| @EnableHello | |
| public class AppConfig implements NameConfigurer { | |
| @Override | |
| public void configure(Hello hello) { | |
| hello.setName("Thank you very much, 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
| @Retention(value = RetentionPolicy.RUNTIME) | |
| @Import(HeloIBDR.class) | |
| public @interface EnableHello { | |
| String name(); | |
| } |
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
| @Configuration | |
| @EnableHello(type = "korean", name = "Keesun") | |
| public class AppConfig { | |
| } |
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
| @Configuration | |
| @EnableHello(name = "Keesun") | |
| public class AppConfig { | |
| } |
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
| @Configuration | |
| @EnableHello | |
| public class AppConfig { | |
| } |
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
| @Configuration | |
| @Import(HelloConfig.class) | |
| public class AppConfig { | |
| @Override | |
| public Hello hello() { | |
| Hello h = super.hello(); | |
| h.setName("Keesun"); | |
| return h; | |
| } | |
| } |
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
| @Configuration | |
| public class AppConfig extends HelloConfig { | |
| @Override | |
| public Hello hello() { | |
| Hello h = super.hello(); | |
| h.setName("Keesun"); | |
| return h; | |
| } | |
| } |
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 sandbox.testcontext.config; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| /** | |
| * @author Keesun Baik | |
| */ | |
| @Configuration | |
| public class AppConfig { |
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 me.whiteship.board.modules.servlet.async; | |
| import javax.servlet.AsyncContext; | |
| import javax.servlet.AsyncEvent; | |
| import javax.servlet.AsyncListener; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.annotation.WebServlet; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; |
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
| @WebServlet("/upload") | |
| @MultipartConfig(location = "/tmp") | |
| public class FileUploadServlet extends HttpServlet { | |
| @Override | |
| protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { | |
| getServletContext().getRequestDispatcher("/WEB-INF/views/fileUpload.jsp").forward(req, res); | |
| } | |
| @Override |