findQuotesByAuthor(String author); 9 | 10 | void deleteQuote(Quote quote); 11 | 12 | void addQuote(Quote quote); 13 | } 14 | -------------------------------------------------------------------------------- /spring-di-annotation-javaconfig/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 |3 | -------------------------------------------------------------------------------- /spring-di-annotation/src/main/java/com/spring/examples/service/QuoteService.java: -------------------------------------------------------------------------------- 1 | package com.spring.examples.service; 2 | 3 | import com.spring.examples.model.Quote; 4 | 5 | import java.util.List; 6 | 7 | public interface QuoteService { 8 | List4 | 9 |System.out 5 |6 | 8 |%5p <%d{yyyy-MM-dd HH:mm:ss}>[%C:%L] [%thread] %m%n 7 |10 | 12 |11 | findQuotesByAuthor(String author); 9 | 10 | void deleteQuote(Quote quote); 11 | 12 | void addQuote(Quote quote); 13 | } 14 | -------------------------------------------------------------------------------- /spring-di-annotation/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 |3 | -------------------------------------------------------------------------------- /spring-di-javaconfig/src/main/java/com/spring/examples/App.java: -------------------------------------------------------------------------------- 1 | package com.spring.examples; 2 | 3 | /** 4 | * Hello world! 5 | * 6 | */ 7 | public class App 8 | { 9 | public static void main( String[] args ) 10 | { 11 | System.out.println( "Hello World!" ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-di-javaconfig/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 |4 | 9 |System.out 5 |6 | 8 |%5p <%d{yyyy-MM-dd HH:mm:ss}>[%C:%L] [%thread] %m%n 7 |10 | 12 |11 | 3 | -------------------------------------------------------------------------------- /spring-di-javaconfig/src/test/java/com/spring/examples/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.spring.examples; 2 | 3 | import static org.junit.Assert.assertTrue; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | { 12 | /** 13 | * Rigorous Test :-) 14 | */ 15 | @Test 16 | public void shouldAnswerWithTrue() 17 | { 18 | assertTrue( true ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spring-messaging-websocket/src/main/java/com/advenoh/model/Greeting.java: -------------------------------------------------------------------------------- 1 | package com.advenoh.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | @Data 7 | @AllArgsConstructor 8 | public class Greeting { 9 | 10 | private String content; 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-messaging-websocket/src/main/java/com/advenoh/model/HelloMessage.java: -------------------------------------------------------------------------------- 1 | package com.advenoh.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class HelloMessage { 7 | 8 | private String name; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /spring-messaging-websocket/src/main/java/com/advenoh/model/Message.java: -------------------------------------------------------------------------------- 1 | package com.advenoh.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Message { 7 | 8 | private String from; 9 | private String text; 10 | } 11 | -------------------------------------------------------------------------------- /spring-messaging-websocket/src/main/java/com/advenoh/model/OutputMessage.java: -------------------------------------------------------------------------------- 1 | package com.advenoh.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | @Data 7 | @AllArgsConstructor 8 | public class OutputMessage { 9 | 10 | private String from; 11 | private String text; 12 | private String time; 13 | 14 | } -------------------------------------------------------------------------------- /spring-messaging-websocket/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 |4 | 9 |System.out 5 |6 | 8 |%5p <%d{yyyy-MM-dd HH:mm:ss}>[%C:%L] [%thread] %m%n 7 |10 | 12 |11 | 3 | -------------------------------------------------------------------------------- /spring-messaging-websocket/src/main/webapp/resources/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #f5f5f5; 3 | } 4 | 5 | #main-content { 6 | max-width: 940px; 7 | padding: 2em 3em; 8 | margin: 0 auto 20px; 9 | background-color: #fff; 10 | border: 1px solid #e5e5e5; 11 | -webkit-border-radius: 5px; 12 | -moz-border-radius: 5px; 13 | border-radius: 5px; 14 | } -------------------------------------------------------------------------------- /spring-model-attribute-method/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 |4 | 9 |System.out 5 |6 | 8 |%5p <%d{yyyy-MM-dd HH:mm:ss}>[%C:%L] [%thread] %m%n 7 |10 | 12 |11 | 3 | -------------------------------------------------------------------------------- /spring-model-attribute-method/src/main/webapp/WEB-INF/views/my-page.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" 2 | contentType="text/html; charset=ISO-8859-1" 3 | pageEncoding="ISO-8859-1" %> 4 | 5 | 6 |4 | 9 |System.out 5 |6 | 8 |%5p <%d{yyyy-MM-dd HH:mm:ss}>[%C:%L] [%thread] %m%n 7 |10 | 12 |11 | Message : ${msg} 7 |
8 |
Time: ${time}
9 |Total Visits: ${visits}
10 |
11 |Requested by : ${querier}
12 | 13 | -------------------------------------------------------------------------------- /spring-model-attribute-method/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 |6 | 8 | -------------------------------------------------------------------------------- /spring-model-attribute-method/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |Archetype Created Web Application 7 |Hello World!
4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-model-attribute/README.md: -------------------------------------------------------------------------------- 1 | https://www.logicbig.com/tutorials/spring-framework/spring-web-mvc/spring-model-attribute-handler-param.html -------------------------------------------------------------------------------- /spring-model-attribute/src/main/main/java/com/logicbig/example/UserService.java: -------------------------------------------------------------------------------- 1 | package com.logicbig.example; 2 | 3 | public interface UserService { 4 | 5 | User getUserById(long id); 6 | } -------------------------------------------------------------------------------- /spring-model-attribute/src/main/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 |3 | -------------------------------------------------------------------------------- /spring-model-attribute/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 |4 | 9 |System.out 5 |6 | 8 |%5p <%d{yyyy-MM-dd HH:mm:ss}>[%C:%L] [%thread] %m%n 7 |10 | 12 |11 | 6 | 8 | -------------------------------------------------------------------------------- /spring-model-attribute/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |Archetype Created Web Application 7 |Hello World!
4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-mvc-exception-journaldev/src/main/java/com/journaldev/spring/model/Employee.java: -------------------------------------------------------------------------------- 1 | package com.journaldev.spring.model; 2 | 3 | public class Employee { 4 | 5 | private String name; 6 | private int id; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public int getId() { 17 | return id; 18 | } 19 | 20 | public void setId(int id) { 21 | this.id = id; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /spring-mvc-exception-journaldev/src/main/webapp/WEB-INF/spring/root-context.xml: -------------------------------------------------------------------------------- 1 | 2 |5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spring-mvc-exception-journaldev/src/main/webapp/WEB-INF/views/home.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 2 | <%@ page session="false" %> 3 | 4 | 5 |Home 6 | 7 | 8 |Hello ${employee.name}!
9 |Your ID is ${employee.id}
10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-mvc-hello-world/README.md: -------------------------------------------------------------------------------- 1 | http://www.mkyong.com/spring-mvc/gradle-spring-mvc-web-project-example/ -------------------------------------------------------------------------------- /spring-mvc-hello-world/src/main/webapp/resources/core/css/hello.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenshin579/tutorials-java/783bdf228142fe1a0dc7c06b0d0d20d3101dead5/spring-mvc-hello-world/src/main/webapp/resources/core/css/hello.css -------------------------------------------------------------------------------- /spring-mvc-hello-world/src/main/webapp/resources/core/js/hello.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenshin579/tutorials-java/783bdf228142fe1a0dc7c06b0d0d20d3101dead5/spring-mvc-hello-world/src/main/webapp/resources/core/js/hello.js -------------------------------------------------------------------------------- /spring-mvc-javaconfig-commons-fileupload-ajax/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 |6 | 8 | -------------------------------------------------------------------------------- /spring-mvc-mybatis/README.md: -------------------------------------------------------------------------------- 1 | http://pmingdiary.tistory.com/19 -------------------------------------------------------------------------------- /spring-mvc-mybatis/src/main/java/com/mybatis/sample/constance/DaoConst.java: -------------------------------------------------------------------------------- 1 | package com.mybatis.sample.constance; 2 | 3 | public class DaoConst { 4 | 5 | public static final String NAMESPACE_CODE = "com.mybatis.sample.code_mapper"; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /spring-mvc-mybatis/src/main/java/com/mybatis/sample/dao/CodeDAO.java: -------------------------------------------------------------------------------- 1 | package com.mybatis.sample.dao; 2 | 3 | import com.mybatis.sample.vo.CodeVO; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface CodeDAO { 9 | 10 | public ListArchetype Created Web Application 7 |