├── README.md ├── AngularJS ├── web │ ├── angluar-phonecat │ │ ├── css │ │ │ ├── .gitkeep │ │ │ ├── app.css │ │ │ └── animations.css │ │ ├── img │ │ │ ├── .gitkeep │ │ │ ├── phones │ │ │ │ ├── lg-axis.0.jpg │ │ │ │ ├── lg-axis.1.jpg │ │ │ │ ├── lg-axis.2.jpg │ │ │ │ ├── nexus-s.0.jpg │ │ │ │ ├── nexus-s.1.jpg │ │ │ │ ├── nexus-s.2.jpg │ │ │ │ ├── nexus-s.3.jpg │ │ │ │ ├── sanyo-zio.0.jpg │ │ │ │ ├── sanyo-zio.1.jpg │ │ │ │ ├── sanyo-zio.2.jpg │ │ │ │ ├── dell-venue.0.jpg │ │ │ │ ├── dell-venue.1.jpg │ │ │ │ ├── dell-venue.2.jpg │ │ │ │ ├── dell-venue.3.jpg │ │ │ │ ├── dell-venue.4.jpg │ │ │ │ ├── dell-venue.5.jpg │ │ │ │ ├── samsung-gem.0.jpg │ │ │ │ ├── samsung-gem.1.jpg │ │ │ │ ├── samsung-gem.2.jpg │ │ │ │ ├── t-mobile-g2.0.jpg │ │ │ │ ├── t-mobile-g2.1.jpg │ │ │ │ ├── t-mobile-g2.2.jpg │ │ │ │ ├── dell-streak-7.0.jpg │ │ │ │ ├── dell-streak-7.1.jpg │ │ │ │ ├── dell-streak-7.2.jpg │ │ │ │ ├── dell-streak-7.3.jpg │ │ │ │ ├── dell-streak-7.4.jpg │ │ │ │ ├── motorola-xoom.0.jpg │ │ │ │ ├── motorola-xoom.1.jpg │ │ │ │ ├── motorola-xoom.2.jpg │ │ │ │ ├── motorola-atrix-4g.0.jpg │ │ │ │ ├── motorola-atrix-4g.1.jpg │ │ │ │ ├── motorola-atrix-4g.2.jpg │ │ │ │ ├── motorola-atrix-4g.3.jpg │ │ │ │ ├── samsung-galaxy-tab.0.jpg │ │ │ │ ├── samsung-galaxy-tab.1.jpg │ │ │ │ ├── samsung-galaxy-tab.2.jpg │ │ │ │ ├── samsung-galaxy-tab.3.jpg │ │ │ │ ├── samsung-galaxy-tab.4.jpg │ │ │ │ ├── samsung-galaxy-tab.5.jpg │ │ │ │ ├── samsung-galaxy-tab.6.jpg │ │ │ │ ├── samsung-transform.0.jpg │ │ │ │ ├── samsung-transform.1.jpg │ │ │ │ ├── samsung-transform.2.jpg │ │ │ │ ├── samsung-transform.3.jpg │ │ │ │ ├── samsung-transform.4.jpg │ │ │ │ ├── t-mobile-mytouch-4g.0.jpg │ │ │ │ ├── t-mobile-mytouch-4g.1.jpg │ │ │ │ ├── t-mobile-mytouch-4g.2.jpg │ │ │ │ ├── t-mobile-mytouch-4g.3.jpg │ │ │ │ ├── t-mobile-mytouch-4g.4.jpg │ │ │ │ ├── t-mobile-mytouch-4g.5.jpg │ │ │ │ ├── droid-pro-by-motorola.0.jpg │ │ │ │ ├── droid-pro-by-motorola.1.jpg │ │ │ │ ├── motorola-xoom-with-wi-fi.0.jpg │ │ │ │ ├── motorola-xoom-with-wi-fi.1.jpg │ │ │ │ ├── motorola-xoom-with-wi-fi.2.jpg │ │ │ │ ├── motorola-xoom-with-wi-fi.3.jpg │ │ │ │ ├── motorola-xoom-with-wi-fi.4.jpg │ │ │ │ ├── motorola-xoom-with-wi-fi.5.jpg │ │ │ │ ├── droid-2-global-by-motorola.0.jpg │ │ │ │ ├── droid-2-global-by-motorola.1.jpg │ │ │ │ ├── droid-2-global-by-motorola.2.jpg │ │ │ │ ├── motorola-bravo-with-motoblur.0.jpg │ │ │ │ ├── motorola-bravo-with-motoblur.1.jpg │ │ │ │ ├── motorola-bravo-with-motoblur.2.jpg │ │ │ │ ├── motorola-charm-with-motoblur.0.jpg │ │ │ │ ├── motorola-charm-with-motoblur.1.jpg │ │ │ │ ├── motorola-charm-with-motoblur.2.jpg │ │ │ │ ├── motorola-defy-with-motoblur.0.jpg │ │ │ │ ├── motorola-defy-with-motoblur.1.jpg │ │ │ │ ├── motorola-defy-with-motoblur.2.jpg │ │ │ │ ├── samsung-mesmerize-a-galaxy-s-phone.0.jpg │ │ │ │ ├── samsung-mesmerize-a-galaxy-s-phone.1.jpg │ │ │ │ ├── samsung-mesmerize-a-galaxy-s-phone.2.jpg │ │ │ │ ├── samsung-mesmerize-a-galaxy-s-phone.3.jpg │ │ │ │ ├── samsung-showcase-a-galaxy-s-phone.0.jpg │ │ │ │ ├── samsung-showcase-a-galaxy-s-phone.1.jpg │ │ │ │ └── samsung-showcase-a-galaxy-s-phone.2.jpg │ │ │ ├── glyphicons-halflings.png │ │ │ └── glyphicons-halflings-white.png │ │ ├── js │ │ │ ├── filters.js │ │ │ ├── app.js │ │ │ └── controllers.js │ │ ├── step-8.html │ │ ├── step-0.html │ │ ├── step-9-practice.html │ │ ├── step-1.html │ │ ├── partials │ │ │ └── phone-list.html │ │ ├── step-2-practice.html │ │ ├── step-3.html │ │ ├── step-2.html │ │ ├── step-3-practice.html │ │ ├── step-5.html │ │ ├── step-5-practice.html │ │ ├── step-6.html │ │ ├── step-4.html │ │ ├── phones │ │ │ ├── sanyo-zio.json │ │ │ ├── motorola-xoom.json │ │ │ ├── motorola-atrix-4g.json │ │ │ └── motorola-bravo-with-motoblur.json │ │ └── step-7.html │ ├── custom-directive │ │ ├── simple-directive-02 │ │ │ ├── template.html │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── transclustion-directive-01 │ │ │ ├── my-dialog.html │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── tabs-example │ │ │ ├── my-pane.html │ │ │ ├── my-tabs.html │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── isolate-scope-directive-01 │ │ │ ├── template.html │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── isolate-fun-bind-directive-01 │ │ │ ├── my-dialog-close.html │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── drag-module │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── simple-directive-01 │ │ │ ├── index.html │ │ │ └── script.js │ │ └── manipulates-dom-directive │ │ │ ├── index.html │ │ │ └── script.js │ ├── js │ │ └── bootstrap-3.0.3 │ │ │ └── dist │ │ │ └── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ ├── index.jsp │ └── WEB-INF │ │ └── web.xml └── pom.xml ├── spring4-mvc-xml ├── README.md └── src │ └── main │ ├── webapp │ ├── index.jsp │ └── WEB-INF │ │ ├── applicationContext.xml │ │ ├── views │ │ └── user │ │ │ ├── edit.jsp │ │ │ └── index.jsp │ │ ├── web.xml │ │ └── example-servlet.xml │ └── java │ └── com │ └── github │ └── loafer │ └── examples │ └── user │ ├── model │ ├── Model.java │ └── User.java │ ├── IUserService.java │ ├── AbstractCrudService.java │ └── ICrudService.java ├── spring4-mvc-xml-complex ├── README.md ├── src │ └── main │ │ ├── resources │ │ └── config │ │ │ ├── i18n │ │ │ ├── user.properties │ │ │ └── hello.properties │ │ │ └── user-servlet.xml │ │ ├── webapp │ │ ├── WEB-INF │ │ │ ├── views │ │ │ │ ├── exception.jsp │ │ │ │ ├── hello │ │ │ │ │ └── index.jsp │ │ │ │ └── user │ │ │ │ │ └── index.jsp │ │ │ ├── applicationContext.xml │ │ │ └── web.xml │ │ └── index.jsp │ │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ └── examples │ │ └── user │ │ ├── model │ │ └── User.java │ │ ├── exception │ │ └── UserNotFoundException.java │ │ └── web │ │ ├── ErrorResponse.java │ │ ├── ExceptionProcessorAdvice.java │ │ └── UserController.java └── pom.xml ├── .gitignore ├── jasig-cas-client ├── src │ └── main │ │ ├── webapp │ │ ├── index.jsp │ │ └── WEB-INF │ │ │ ├── applicationContext.xml │ │ │ └── example-servlet.xml │ │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ └── examples │ │ └── user │ │ ├── IUserService.java │ │ ├── UserService.java │ │ └── controller │ │ └── UserController.java └── pom.xml ├── mybatis-simple-common-mapper └── src │ ├── test │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── quick4j │ │ │ ├── entity │ │ │ ├── Entity.java │ │ │ └── Teacher.java │ │ │ ├── repository │ │ │ └── Repository.java │ │ │ └── mybatis │ │ │ └── mapper │ │ │ ├── builder │ │ │ ├── assistant │ │ │ │ ├── MappedStatementAssistant.java │ │ │ │ └── EntityAssistant.java │ │ │ └── MapperBuilder.java │ │ │ └── BaseMapper.java │ └── resources │ │ ├── db.properties │ │ ├── log4j.properties │ │ ├── spring-config.xml │ │ └── spring-mybatis-config.xml │ └── main │ └── java │ └── com │ └── github │ └── quick4j │ └── App.java ├── mybatis-sqlbuilder └── src │ ├── test │ ├── resources │ │ ├── db.properties │ │ ├── log4j.properties │ │ ├── spring-config.xml │ │ ├── mappers │ │ │ └── UserMapper.xml │ │ └── spring-mybatis-config.xml │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ ├── entity │ │ ├── StudentMapper.java │ │ ├── Student.java │ │ └── Teacher.java │ │ ├── MapperTest.java │ │ ├── MybatisTest.java │ │ └── SqlBuilderTest.java │ └── main │ └── java │ └── com │ └── github │ ├── quick4j │ └── core │ │ ├── entity │ │ ├── Entity.java │ │ └── AbstractEntity.java │ │ ├── mybatis │ │ └── annotation │ │ │ └── MapperNamespace.java │ │ └── repository │ │ └── mybaits │ │ ├── MyBatisRepository.java │ │ └── sqlbuilder │ │ ├── EntityAssistant.java │ │ ├── MapperRegistry.java │ │ ├── mapper │ │ └── Mapper.java │ │ ├── metadata │ │ └── ColumnMetadata.java │ │ └── MapperBuilder.java │ └── loafer │ ├── App.java │ └── mybatis │ └── sqlbuilder │ ├── InterceptorOne.java │ └── InterceptorTwo.java ├── jasig-cas-client-custom-login ├── src │ └── main │ │ ├── resources │ │ └── evn.properties │ │ └── webapp │ │ ├── WEB-INF │ │ ├── web.xml │ │ └── applicationContext.xml │ │ └── success.jsp ├── README.md └── pom.xml ├── spring4-mybatis └── src │ ├── main │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ └── mybatis │ │ ├── generics │ │ ├── mapper │ │ │ ├── UserMapper.java │ │ │ └── ICrudMapper.java │ │ ├── ICrudService.java │ │ ├── UserService.java │ │ └── SimpleCrudService.java │ │ ├── simple │ │ ├── IUserService.java │ │ ├── mapper │ │ │ └── UserMapper.java │ │ ├── UserService.java │ │ └── model │ │ │ └── User.java │ │ └── other │ │ ├── IRepository.java │ │ ├── Model.java │ │ └── ICrudService.java │ └── test │ ├── resources │ ├── simple.xml │ ├── generics.xml │ ├── config │ │ └── mappers │ │ │ ├── userMapper.xml │ │ │ ├── userMapperForGemerics.xml │ │ │ └── userMapperForOther.xml │ └── spring.xml │ └── java │ └── com │ └── github │ └── loafer │ └── mybatis │ ├── UserServiceForGenerisTest.java │ └── MybatisMapperTest.java ├── spring4-mvc-exception-handling ├── web │ ├── WEB-INF │ │ ├── views │ │ │ ├── exception.jsp │ │ │ └── hello.jsp │ │ ├── web.xml │ │ └── examples-servlet.xml │ └── index.jsp ├── src │ └── main │ │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ └── examples │ │ ├── model │ │ └── User.java │ │ ├── exception │ │ └── UserNotFoundException.java │ │ └── web │ │ ├── ErrorResponse.java │ │ ├── HelloController.java │ │ └── ExceptionProcessorAdvice.java └── pom.xml ├── guava-eventbus ├── src │ └── test │ │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ └── eventbus │ │ ├── event │ │ └── HelloEvent.java │ │ ├── HelloEventListener.java │ │ └── TestEventBus.java └── pom.xml ├── reactor-spring ├── src │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── github │ │ │ └── loafer │ │ │ └── hello │ │ │ ├── ReactorFactory.java │ │ │ ├── HelloApplication.java │ │ │ └── consumer │ │ │ ├── HelloConsumer.java │ │ │ ├── HandlerBean.java │ │ │ ├── ResultHandlerBean.java │ │ │ └── ReplyHandlerBean.java │ └── test │ │ └── resources │ │ └── spring-config.xml └── pom.xml ├── logback ├── src │ ├── main │ │ ├── resources │ │ │ └── logback-test.xml │ │ └── java │ │ │ └── com │ │ │ └── github │ │ │ └── loafer │ │ │ └── logback │ │ │ ├── HelloWorld.java │ │ │ └── HelloWorld2.java │ └── test │ │ └── resources │ │ └── logback-test.xml └── pom.xml ├── spring-security-web └── src │ └── main │ └── webapp │ ├── main.jsp │ ├── WEB-INF │ ├── applicationContext.xml │ ├── web.xml │ ├── spring-security-simple.xml │ └── spring-security-custom.xml │ └── index.jsp ├── core-java-annotation ├── src │ └── main │ │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ └── annotation │ │ ├── declaration │ │ ├── ClassLeveAnnotation.java │ │ ├── NullValueValidate.java │ │ └── MethodLeveAnnotation.java │ │ ├── AnnotationExample.java │ │ ├── AnAnnotatedClass.java │ │ └── processor │ │ └── NullValueValidateProcessor.java └── pom.xml ├── jasig-cas-proxy ├── src │ └── main │ │ ├── webapp │ │ ├── proxy.jsp │ │ └── index.jsp │ │ ├── resources │ │ └── log4j.properties │ │ └── java │ │ └── com │ │ └── github │ │ └── loafer │ │ └── examples │ │ └── web │ │ └── controller │ │ └── CasProxyServlet.java └── pom.xml ├── xml ├── pom.xml └── src │ └── test │ ├── resources │ └── example.xml │ └── java │ └── com │ └── github │ └── loafer │ └── xml │ └── XPathParserUnitTest.java ├── junit4 ├── pom.xml └── src │ └── test │ └── java │ └── com │ └── github │ └── loafer │ └── junit │ └── AssertTests.java └── mockito └── pom.xml /README.md: -------------------------------------------------------------------------------- 1 | tutorials 2 | ========= 3 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/css/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spring4-mvc-xml/README.md: -------------------------------------------------------------------------------- 1 | * 使用Spring mvc拦截所有请求 2 | * 对静态资源的处理 3 | * Spring mvc 基本使用 -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/README.md: -------------------------------------------------------------------------------- 1 | * 动态注册DispatcherServlet(适用与Servlet3.0+). 2 | * 动态加载国际化资源文件 -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/simple-directive-02/template.html: -------------------------------------------------------------------------------- 1 | Name: {{customer.name}} Address: {{customer.address}} -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/transclustion-directive-01/my-dialog.html: -------------------------------------------------------------------------------- 1 |
2 |
-------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/resources/config/i18n/user.properties: -------------------------------------------------------------------------------- 1 | user.test = The message from 'user.properties'. -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/tabs-example/my-pane.html: -------------------------------------------------------------------------------- 1 |
2 |
-------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/resources/config/i18n/hello.properties: -------------------------------------------------------------------------------- 1 | hello.test = This message from 'hello.properties'. -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/isolate-scope-directive-01/template.html: -------------------------------------------------------------------------------- 1 | Name: {{customerInfo.name}} Address: {{customerInfo.address}} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | pom.xml.tag 3 | pom.xml.releaseBackup 4 | pom.xml.next 5 | release.properties 6 | *.iml 7 | *.ipr 8 | *.iws 9 | .idea/ 10 | out/ 11 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/lg-axis.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/lg-axis.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/lg-axis.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/lg-axis.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/lg-axis.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/lg-axis.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/nexus-s.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/nexus-s.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/nexus-s.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/nexus-s.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/nexus-s.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/nexus-s.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/nexus-s.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/nexus-s.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/sanyo-zio.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/sanyo-zio.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/sanyo-zio.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/sanyo-zio.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/sanyo-zio.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/sanyo-zio.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-venue.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-venue.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-venue.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-venue.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-venue.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-venue.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-venue.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-venue.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-venue.4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-venue.4.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-venue.5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-venue.5.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-gem.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-gem.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-gem.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-gem.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-gem.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-gem.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-g2.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-g2.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-g2.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-g2.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-g2.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-g2.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/dell-streak-7.4.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-atrix-4g.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.4.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.5.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-galaxy-tab.6.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-transform.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-transform.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-transform.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-transform.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-transform.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-transform.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-transform.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-transform.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-transform.4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-transform.4.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.4.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/t-mobile-mytouch-4g.5.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/droid-pro-by-motorola.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/droid-pro-by-motorola.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/droid-pro-by-motorola.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/droid-pro-by-motorola.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.4.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-xoom-with-wi-fi.5.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/droid-2-global-by-motorola.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/droid-2-global-by-motorola.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/droid-2-global-by-motorola.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/droid-2-global-by-motorola.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/droid-2-global-by-motorola.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/droid-2-global-by-motorola.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/isolate-fun-bind-directive-01/my-dialog-close.html: -------------------------------------------------------------------------------- 1 |
2 | × 3 |
4 |
-------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-bravo-with-motoblur.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-bravo-with-motoblur.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-bravo-with-motoblur.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-bravo-with-motoblur.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-bravo-with-motoblur.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-bravo-with-motoblur.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-charm-with-motoblur.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-charm-with-motoblur.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-charm-with-motoblur.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-charm-with-motoblur.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-charm-with-motoblur.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-charm-with-motoblur.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-defy-with-motoblur.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-defy-with-motoblur.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-defy-with-motoblur.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-defy-with-motoblur.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/motorola-defy-with-motoblur.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/motorola-defy-with-motoblur.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/js/bootstrap-3.0.3/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/js/bootstrap-3.0.3/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /AngularJS/web/js/bootstrap-3.0.3/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/js/bootstrap-3.0.3/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /AngularJS/web/js/bootstrap-3.0.3/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/js/bootstrap-3.0.3/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /jasig-cas-client/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello CAS Client APP!

4 | cas-proxy 5 | 6 | 7 | -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/test/java/com/github/quick4j/entity/Entity.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.entity; 2 | 3 | /** 4 | * @author zhaojh. 5 | */ 6 | public interface Entity { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/test/resources/db.properties: -------------------------------------------------------------------------------- 1 | db.driver=com.mysql.jdbc.Driver 2 | db.url=jdbc:mysql://localhost:3306/quick4j?useUnicode=true&characterEncoding=utf-8 3 | db.username=root 4 | db.password=123 -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.2.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-mesmerize-a-galaxy-s-phone.3.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-showcase-a-galaxy-s-phone.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-showcase-a-galaxy-s-phone.1.jpg -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/img/phones/samsung-showcase-a-galaxy-s-phone.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/tutorials/master/AngularJS/web/angluar-phonecat/img/phones/samsung-showcase-a-galaxy-s-phone.2.jpg -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/test/resources/db.properties: -------------------------------------------------------------------------------- 1 | db.driver=com.mysql.jdbc.Driver 2 | db.url=jdbc:mysql://localhost:3306/quick4j?useUnicode=true&characterEncoding=utf-8 3 | db.username=root 4 | db.password=123 -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/js/filters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zjh on 14-5-13. 3 | */ 4 | angular.module('phonecatFilters', []).filter('checkmark', function(){ 5 | return function(input){ 6 | return input ? '\u2713' : '\u2718'; 7 | } 8 | }); -------------------------------------------------------------------------------- /AngularJS/web/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 |

这是一个Angual JS 的演示工程.

9 | 10 | 11 | -------------------------------------------------------------------------------- /spring4-mvc-xml/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/step-8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

在 step-7基础上完善phone-detail.html页面

9 | 10 | -------------------------------------------------------------------------------- /spring4-mvc-xml/src/main/java/com/github/loafer/examples/user/model/Model.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.user.model; 2 | 3 | /** 4 | * Date Created 14-5-21 5 | * 6 | * @author zjh 7 | */ 8 | public interface Model { 9 | String getId(); 10 | } 11 | -------------------------------------------------------------------------------- /jasig-cas-client/src/main/java/com/github/loafer/examples/user/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.user; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by zhaojh on 14-5-28. 7 | */ 8 | public interface IUserService { 9 | List selectList(); 10 | } 11 | -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/main/java/com/github/quick4j/core/entity/Entity.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.core.entity; 2 | 3 | /** 4 | * @author zhaojh. 5 | */ 6 | public interface Entity { 7 | String getId(); 8 | boolean isNew(); 9 | String getMapperNamespace(); 10 | } 11 | -------------------------------------------------------------------------------- /jasig-cas-client-custom-login/src/main/resources/evn.properties: -------------------------------------------------------------------------------- 1 | #\u7EDF\u4E00\u8BA4\u8BC1\u767B\u5F55\u9875\u9762url 2 | cas.login.url=http://localhost:8080/cas/login 3 | #\u7EDF\u4E00\u8BA4\u8BC1\u6210\u529F\u540E\u8981\u8DF3\u8F6C\u9875\u9762\u7684uri 4 | cas.login.success.goto.location=success.jsp -------------------------------------------------------------------------------- /jasig-cas-client-custom-login/README.md: -------------------------------------------------------------------------------- 1 | 自定义登录页 2 | ==== 3 | 用过CAS的人都知道,CAS-Server做为认证中心需要单独部署。当用户每次登录业务系统时,都会被重定向到CAS-Server的登录页上。但是有时候我们希望登录页能更佳灵活,比如可以嵌入到业务系统的某个页面中的一个面板内。本Demo就演示了这个功能,本工程只是针对客户端的改造,有关CAS-Server端的改造请查看另一个工程。 4 | 5 | 参考自:https://wiki.jasig.org/display/CAS/Using+CAS+without+the+Login+Screen -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/main/java/com/github/loafer/App.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer; 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 | -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/main/java/com/github/quick4j/App.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j; 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 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/generics/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.generics.mapper; 2 | 3 | import com.github.loafer.mybatis.simple.model.User; 4 | 5 | /** 6 | * @author zhaojh 7 | */ 8 | public interface UserMapper extends ICrudMapper{ 9 | } 10 | -------------------------------------------------------------------------------- /spring4-mvc-xml/src/main/java/com/github/loafer/examples/user/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.user; 2 | 3 | import com.github.loafer.examples.user.model.User; 4 | /** 5 | * Date Created 14-5-21 6 | * 7 | * @author zjh 8 | */ 9 | public interface IUserService extends ICrudService { 10 | } 11 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/tabs-example/my-tabs.html: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 |
-------------------------------------------------------------------------------- /AngularJS/web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spring4-mvc-exception-handling/web/WEB-INF/views/exception.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ${name}: ${message} 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/generics/ICrudService.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.generics; 2 | 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | /** 8 | * @author zhaojh 9 | */ 10 | public interface ICrudService { 11 | T find(String id); 12 | 13 | List find(Map parameter); 14 | } 15 | -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/test/java/com/github/loafer/entity/StudentMapper.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.entity; 2 | 3 | import org.apache.ibatis.annotations.Select; 4 | 5 | /** 6 | * @author zhaojh. 7 | */ 8 | public interface StudentMapper { 9 | @Select("select id, stu_name, stu_age from test_student where id=#{id}") 10 | Student findOne(String id); 11 | } 12 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/webapp/WEB-INF/views/exception.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ${name}: ${message} 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/java/com/github/loafer/examples/user/model/User.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.user.model; 2 | 3 | /** 4 | * @author zhaojh 5 | */ 6 | public class User { 7 | private String id; 8 | 9 | public User(String id) { 10 | this.id = id; 11 | } 12 | 13 | public String getId() { 14 | return id; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/drag-module/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Drag ME 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring4-mvc-exception-handling/src/main/java/com/github/loafer/examples/model/User.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.model; 2 | 3 | /** 4 | * Created by zhaojh on 14-7-3. 5 | */ 6 | public class User { 7 | private String name; 8 | 9 | public User(String name) { 10 | this.name = name; 11 | } 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /guava-eventbus/src/test/java/com/github/loafer/eventbus/event/HelloEvent.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.eventbus.event; 2 | 3 | /** 4 | * @author zhaojh 5 | */ 6 | public class HelloEvent { 7 | private String message; 8 | 9 | public HelloEvent(String message) { 10 | this.message = message; 11 | } 12 | 13 | public String getMessage() { 14 | return message; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/simple/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.simple; 2 | 3 | import com.github.loafer.mybatis.simple.model.User; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * @author zhaojh 10 | */ 11 | public interface IUserService { 12 | User find(String id); 13 | 14 | List find(Map parameter); 15 | } 16 | -------------------------------------------------------------------------------- /reactor-spring/src/main/java/com/github/loafer/hello/ReactorFactory.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.hello; 2 | 3 | import reactor.core.Environment; 4 | import reactor.core.Reactor; 5 | import reactor.core.spec.Reactors; 6 | 7 | /** 8 | * @author zhaojh 9 | */ 10 | public class ReactorFactory { 11 | public static Reactor createReactor(){ 12 | return Reactors.reactor().env(new Environment()).get(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /guava-eventbus/src/test/java/com/github/loafer/eventbus/HelloEventListener.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.eventbus; 2 | 3 | import com.github.loafer.eventbus.event.HelloEvent; 4 | import com.google.common.eventbus.Subscribe; 5 | 6 | /** 7 | * @author zhaojh 8 | */ 9 | public class HelloEventListener { 10 | @Subscribe 11 | public void sayHello(HelloEvent event){ 12 | System.out.println(event.getMessage()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /logback/src/main/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /logback/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-security-web/src/main/webapp/main.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

Hello World!

10 |
11 | logout 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /spring4-mvc-exception-handling/web/WEB-INF/views/hello.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

Spring MVC Exception Handling

10 | Click here to test Exception handling 11 | 12 | 13 | -------------------------------------------------------------------------------- /logback/src/main/java/com/github/loafer/logback/HelloWorld.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.logback; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | 6 | /** 7 | * Date Created 14-3-17 8 | * 9 | * @author zjh 10 | */ 11 | public class HelloWorld { 12 | public static void main(String[] args){ 13 | Logger logger = LoggerFactory.getLogger(HelloWorld.class); 14 | logger.debug("Hello World"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/generics/mapper/ICrudMapper.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.generics.mapper; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author zhaojh 7 | */ 8 | public interface ICrudMapper { 9 | T selectOne(String id); 10 | 11 | List selectList(Object parameter); 12 | 13 | int insert(T parameter); 14 | 15 | void update(T parameter); 16 | 17 | void delete(String id); 18 | } 19 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/simple-directive-01/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/simple-directive-02/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/simple-directive-02/script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zjh on 14-5-15. 3 | */ 4 | angular.module('docsSimpleDirective', []) 5 | .controller('Controller', ['$scope', function($scope){ 6 | $scope.customer = { 7 | name: 'Naomi', 8 | address: '1600 Amphitheatre' 9 | }; 10 | }]) 11 | .directive('myCustomer', function(){ 12 | return { 13 | templateUrl: 'template.html' 14 | } 15 | }); -------------------------------------------------------------------------------- /spring4-mvc-exception-handling/src/main/java/com/github/loafer/examples/exception/UserNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.exception; 2 | 3 | /** 4 | * @author zhaojh 5 | */ 6 | public class UserNotFoundException extends RuntimeException{ 7 | private String name; 8 | 9 | public UserNotFoundException(String name) { 10 | this.name = name; 11 | } 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/simple/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.simple.mapper; 2 | 3 | import com.github.loafer.mybatis.generics.mapper.ICrudMapper; 4 | import com.github.loafer.mybatis.simple.model.User; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author zhaojh 10 | */ 11 | public interface UserMapper{ 12 | 13 | User selectOne(String id); 14 | 15 | List selectList(Object parameter); 16 | } 17 | -------------------------------------------------------------------------------- /spring4-mvc-exception-handling/web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhaojh 4 | Date: 14-7-3 5 | Time: 下午12:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/java/com/github/loafer/examples/user/exception/UserNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.user.exception; 2 | 3 | /** 4 | * @author zhaojh 5 | */ 6 | public class UserNotFoundException extends RuntimeException{ 7 | private final String name; 8 | 9 | public UserNotFoundException(String name) { 10 | this.name = name; 11 | } 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-security-web/src/main/webapp/WEB-INF/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /core-java-annotation/src/main/java/com/github/loafer/annotation/declaration/ClassLeveAnnotation.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.annotation.declaration; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Created by zhaojh on 14-6-5. 10 | */ 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target(ElementType.TYPE) 13 | public @interface ClassLeveAnnotation { 14 | } 15 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/simple-directive-01/script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zjh on 14-5-15. 3 | */ 4 | angular.module('docsSimpleDirective', []) 5 | .controller('Controller', ['$scope', function($scope){ 6 | $scope.customer = { 7 | name: 'Naomi', 8 | address: '1600 Amphitheatre' 9 | }; 10 | }]) 11 | .directive('myCustomer', function(){ 12 | return { 13 | template: 'Name: {{customer.name}} Address: {{customer.address}}' 14 | } 15 | }); -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/transclustion-directive-01/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | Check out the contents, {{name}}! 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/main/java/com/github/quick4j/core/mybatis/annotation/MapperNamespace.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.core.mybatis.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * @author zhaojh. 10 | */ 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target(ElementType.TYPE) 13 | public @interface MapperNamespace { 14 | String value(); 15 | } 16 | -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=debug, stdout 2 | 3 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=[QC] %p [Thread-%t] %C.%M(%L) | %m%n 6 | 7 | log4j.logger.org.springframework=WARN 8 | 9 | log4j.logger.org.mybatis.spring=debug 10 | log4j.logger.com.apache.ibatis=debug 11 | log4j.logger.java.sql=debug 12 | log4j.logger.java.sql.ResultSet=debug 13 | 14 | -------------------------------------------------------------------------------- /core-java-annotation/src/main/java/com/github/loafer/annotation/declaration/NullValueValidate.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.annotation.declaration; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Created by zhaojh on 2014/6/9. 10 | */ 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target(ElementType.FIELD) 13 | public @interface NullValueValidate { 14 | String fieldName(); 15 | } 16 | -------------------------------------------------------------------------------- /jasig-cas-client-custom-login/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | org.springframework.web.context.ContextLoaderListener 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/generics/UserService.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.generics; 2 | 3 | import com.github.loafer.mybatis.generics.mapper.UserMapper; 4 | import com.github.loafer.mybatis.simple.model.User; 5 | 6 | import javax.annotation.Resource; 7 | 8 | /** 9 | * @author zhaojh 10 | */ 11 | public class UserService extends SimpleCrudService { 12 | @Resource 13 | public void setUserMapper(UserMapper userMapper){ 14 | this.mapper = userMapper; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/transclustion-directive-01/script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zjh on 14-5-16. 3 | */ 4 | angular.module('docsTransclustionDirective', []) 5 | .controller('Controller', ['$scope', function($scope){ 6 | $scope.name = 'Tobias'; 7 | }]) 8 | .directive('myDialog', function(){ 9 | return { 10 | restrict: 'E', 11 | transclude: true, 12 | scope: {}, 13 | link: function(scope, element){ 14 | scope.name = 'Jeff'; 15 | }, 16 | templateUrl: 'my-dialog.html' 17 | } 18 | }); -------------------------------------------------------------------------------- /core-java-annotation/src/main/java/com/github/loafer/annotation/declaration/MethodLeveAnnotation.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.annotation.declaration; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Created by zhaojh on 14-6-5. 10 | */ 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target(ElementType.METHOD) 13 | public @interface MethodLeveAnnotation { 14 | String value() default "hello world"; 15 | } 16 | -------------------------------------------------------------------------------- /spring4-mvc-xml/src/main/webapp/WEB-INF/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/manipulates-dom-directive/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | Date format:
10 | Current time is: 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/isolate-scope-directive-01/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/java/com/github/loafer/examples/user/web/ErrorResponse.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.user.web; 2 | 3 | /** 4 | * @author zhaojh 5 | */ 6 | public class ErrorResponse { 7 | private String url; 8 | private String message; 9 | 10 | public ErrorResponse(String url, String message) { 11 | this.url = url; 12 | this.message = message; 13 | } 14 | 15 | public String getUrl() { 16 | return url; 17 | } 18 | 19 | public String getMessage() { 20 | return message; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 |

Spring-mvc-xml-complex index.

10 |
11 | hello: 12 |
13 |
14 | user: 15 |
16 | 17 | -------------------------------------------------------------------------------- /spring4-mvc-exception-handling/src/main/java/com/github/loafer/examples/web/ErrorResponse.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.examples.web; 2 | 3 | /** 4 | * Created by zhaojh on 14-7-3. 5 | */ 6 | public class ErrorResponse { 7 | private String url; 8 | private String message; 9 | 10 | public ErrorResponse(String url, String message) { 11 | this.url = url; 12 | this.message = message; 13 | } 14 | 15 | public String getUrl() { 16 | return url; 17 | } 18 | 19 | public String getMessage() { 20 | return message; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=info, stdout 2 | 3 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=[QC] %p [%t] %C.%M(%L) | %m%n 6 | 7 | log4j.logger.org.springframework=WARN 8 | 9 | log4j.logger.org.mybatis.spring=debug 10 | log4j.logger.com.apache.ibatis=debug 11 | #log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG 12 | #log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG 13 | log4j.logger.java.sql=debug 14 | 15 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/step-0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Hello {{'world' + '!'}} 10 |

1 + 2 = {{1 + 2}}

11 |
12 |
13 | 14 |

{{greeting.text}}, World!

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/isolate-fun-bind-directive-01/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | Check out the contents, {{name}}! 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/isolate-scope-directive-01/script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zjh on 14-5-15. 3 | */ 4 | angular.module('docsIslateScopeDirective', []) 5 | .controller('Controller', ['$scope', function($scope){ 6 | $scope.naomi = {name: 'Naomi',address: '1600 Amphitheatre'}; 7 | $scope.igor = { name: 'Igor', address: '123 Somewhere' }; 8 | }]) 9 | .directive('myCustomer', function(){ 10 | return { 11 | restrict: 'E', 12 | scope: { 13 | customerInfo: '=info' 14 | }, 15 | templateUrl: 'template.html' 16 | } 17 | }); -------------------------------------------------------------------------------- /jasig-cas-client/src/main/webapp/WEB-INF/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/main/java/com/github/quick4j/core/repository/mybaits/MyBatisRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.core.repository.mybaits; 2 | 3 | import com.github.quick4j.core.entity.Entity; 4 | import org.mybatis.spring.SqlSessionTemplate; 5 | 6 | /** 7 | * @author zhaojh. 8 | */ 9 | public interface MyBatisRepository { 10 | SqlSessionTemplate getSqlSessionTemplate(); 11 | T findOne(Class clazz, String id); 12 | void insert(T entity); 13 | void update(T entity); 14 | void delete(Class clazz, String id); 15 | } 16 | -------------------------------------------------------------------------------- /jasig-cas-proxy/src/main/webapp/proxy.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="org.jasig.cas.client.validation.Assertion" %> 2 | <%@ page import="org.jasig.cas.client.util.AbstractCasFilter" %> 3 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 4 | 5 | 6 | 7 | 8 | 9 | <% 10 | Assertion assertion = (Assertion)session.getAttribute(AbstractCasFilter.CONST_CAS_ASSERTION); 11 | String proxyTicket = assertion.getPrincipal().getProxyTicketFor("http://msoffice/"); 12 | out.write("proxy Ticket: " + proxyTicket); 13 | %> 14 | 15 | 16 | -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/test/java/com/github/quick4j/repository/Repository.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.repository; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author zhaojh. 8 | */ 9 | public interface Repository { 10 | T findOne(Class entityClass, String id); 11 | void insert(T entity); 12 | void update(T entity); 13 | void delete(Class entityClass, String id); 14 | 15 | List findAll(Class entityClass, List ids); 16 | List findAll(Class entityClass, Map parameters); 17 | void delete(Class entityClass, List ids); 18 | } 19 | -------------------------------------------------------------------------------- /spring-security-web/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 |
10 |
11 | 12 | 13 |
14 |
15 | 16 |
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /guava-eventbus/src/test/java/com/github/loafer/eventbus/TestEventBus.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.eventbus; 2 | 3 | import com.github.loafer.eventbus.event.HelloEvent; 4 | import com.google.common.eventbus.EventBus; 5 | import org.junit.Test; 6 | 7 | /** 8 | * @author zhaojh 9 | */ 10 | public class TestEventBus { 11 | 12 | @Test 13 | public void testHelloEvent(){ 14 | EventBus eventBus = new EventBus("hello"); 15 | HelloEventListener listener = new HelloEventListener(); 16 | 17 | eventBus.register(listener); 18 | 19 | HelloEvent event = new HelloEvent("hello world."); 20 | eventBus.post(event); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/other/IRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.other; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author zhaojh 7 | */ 8 | public interface IRepository { 9 | T selectOne(String statement, String id); 10 | 11 | List selectList(String statement, Object parameter); 12 | 13 | int insert(String statement, Object parameter); 14 | 15 | void batchInsert(String statement, List objectList); 16 | 17 | void update(String statement, Object parameter); 18 | 19 | void batchUpdate(String statement, List objectList); 20 | 21 | void delete(String statement, Object parameter); 22 | } 23 | -------------------------------------------------------------------------------- /xml/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.github.loafer 8 | xml 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 13 | junit 14 | junit 15 | 4.11 16 | 17 | 18 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zjh on 14-5-12. 3 | */ 4 | //'use strict'; 5 | angular.module('phonecatApp', ['ngRoute', 'phonecatControllers', 'phonecatFilters']) 6 | .config(['$routeProvider', 7 | function($routeProvider){ 8 | $routeProvider 9 | .when('/phones', { 10 | templateUrl: 'partials/phone-list.html', 11 | controller: 'PhoneListCtrl' 12 | }) 13 | .when('/phones/:phoneId', { 14 | templateUrl: 'partials/phone-detail.html', 15 | controller: 'PhoneDetailCtrl' 16 | }) 17 | .otherwise({redirectTo: '/phones'}) 18 | }]); 19 | 20 | -------------------------------------------------------------------------------- /junit4/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.github.loafer 8 | junit4 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 13 | junit 14 | junit 15 | 4.11 16 | 17 | 18 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/webapp/WEB-INF/views/hello/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; 5 | %> 6 | 7 | 8 | 9 | 10 | 11 | 12 |

Hello ${name}!

13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/generics/SimpleCrudService.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.generics; 2 | 3 | import com.github.loafer.mybatis.generics.mapper.ICrudMapper; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * @author zhaojh 10 | */ 11 | public class SimpleCrudService implements ICrudService { 12 | protected Mapper mapper; 13 | 14 | @Override 15 | public Model find(String id) { 16 | return (Model) mapper.selectOne(id); 17 | } 18 | 19 | @Override 20 | public List find(Map parameter) { 21 | return mapper.selectList(parameter); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/step-9-practice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

angular 内置过滤器演示

10 |

11 | uppercase: {{ "lower cap string" | uppercase }} 12 |

13 |

14 | json: {{ {foo: "bar", baz: 23} | json }} 15 |

16 |

17 | date: {{ 1304375948024 | date }} 18 |

19 |

20 | date:"MM/dd/yyyy @ h:mma": {{ 1304375948024 | date:"MM/dd/yyyy @ h:mma" }} 21 |

22 | 23 | -------------------------------------------------------------------------------- /junit4/src/test/java/com/github/loafer/junit/AssertTests.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.junit; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Ignore; 5 | import org.junit.Test; 6 | 7 | /** 8 | * Date Created 14-3-17 9 | * 10 | * @author zjh 11 | */ 12 | public class AssertTests { 13 | 14 | @Test 15 | public void testAssertArrayEquals(){ 16 | byte[] expected = "trial".getBytes(); 17 | byte[] actual = "trial".getBytes(); 18 | Assert.assertArrayEquals("failure - byte arrays not same", expected, actual); 19 | } 20 | 21 | @Test 22 | @Ignore 23 | public void testAssertEquals(){ 24 | Assert.assertEquals("failure - strings not same", 51, 52); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AngularJS/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.github.loafer 8 | AngularJS 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 13 | javax.servlet 14 | javax.servlet-api 15 | 3.1.0 16 | 17 | 18 | -------------------------------------------------------------------------------- /logback/src/main/java/com/github/loafer/logback/HelloWorld2.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.logback; 2 | 3 | import ch.qos.logback.classic.LoggerContext; 4 | import ch.qos.logback.core.util.StatusPrinter; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | /** 9 | * Date Created 14-3-17 10 | * 11 | * @author zjh 12 | */ 13 | public class HelloWorld2 { 14 | public static void main(String[] args){ 15 | Logger logger = LoggerFactory.getLogger("com.github.loafer.logback.HelloWorld2"); 16 | logger.debug("Hello World."); 17 | 18 | //print internal state 19 | LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); 20 | StatusPrinter.print(lc); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /reactor-spring/src/main/java/com/github/loafer/hello/HelloApplication.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.hello; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.ComponentScan; 5 | import org.springframework.context.annotation.Configuration; 6 | import reactor.core.Environment; 7 | import reactor.core.Reactor; 8 | import reactor.core.spec.Reactors; 9 | import reactor.spring.context.config.EnableReactor; 10 | 11 | /** 12 | * @author zhaojh 13 | */ 14 | @Configuration 15 | @EnableReactor 16 | @ComponentScan 17 | public class HelloApplication { 18 | @Bean 19 | public Reactor rootReactor(Environment env){ 20 | return Reactors.reactor().env(env).get(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring4-mvc-exception-handling/web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | examples 8 | org.springframework.web.servlet.DispatcherServlet 9 | 1 10 | 11 | 12 | examples 13 | / 14 | 15 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/webapp/WEB-INF/views/user/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zjh 4 | Date: 14-5-22 5 | Time: 下午2:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <% 10 | String path = request.getContextPath(); 11 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; 12 | %> 13 | 14 | 15 | 16 | 17 | 18 | 19 |

User List

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/isolate-fun-bind-directive-01/script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zjh on 14-5-16. 3 | */ 4 | angular.module('docsIsoFnBindExample', []) 5 | .controller('Controller', ['$scope', '$timeout', function($scope, $timeout){ 6 | $scope.name = 'Tobias'; 7 | $scope.hideDialog = function(){ 8 | $scope.dialogIsHidden = true; 9 | $timeout(function(){ 10 | $scope.dialogIsHidden = false; 11 | }, 2000); 12 | } 13 | }]) 14 | .directive('myDialogClose', function(){ 15 | return { 16 | restrict: 'E', 17 | transclude: true, 18 | scope: { 19 | close: '&onClose' 20 | }, 21 | templateUrl: 'my-dialog-close.html' 22 | } 23 | }); -------------------------------------------------------------------------------- /reactor-spring/src/main/java/com/github/loafer/hello/consumer/HelloConsumer.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.hello.consumer; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.stereotype.Component; 6 | import reactor.event.Event; 7 | import reactor.function.Consumer; 8 | 9 | /** 10 | * @author zhaojh 11 | */ 12 | @Component 13 | public class HelloConsumer implements Consumer>{ 14 | private static final Logger logger = LoggerFactory.getLogger(HelloConsumer.class); 15 | 16 | @Override 17 | public void accept(Event event) { 18 | logger.info("{} handler accept: {}", event.getKey(), event.getData()); 19 | event.setData("Hello " + event.getData()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring4-mybatis/src/test/resources/simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AngularJS/web/angluar-phonecat/step-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 |
  • 11 | Nexus S 12 |

    13 | Fast just got faster with Nexus S. 14 |

    15 |
  • 16 |
  • 17 | Motorola XOOM™ with Wi-Fi 18 |

    19 | The Next, Next Generation tablet. 20 |

    21 |
  • 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /spring4-mybatis/src/test/resources/generics.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AngularJS/web/custom-directive/tabs-example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |

Hello

11 |

Lorem ipsum dolor sit amet

12 |
13 | 14 |

World

15 | Mauris elementum elementum enim at suscipit. 16 |

counter: {{i || 0}}

17 |
18 |
19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /core-java-annotation/src/main/java/com/github/loafer/annotation/AnnotationExample.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.annotation; 2 | 3 | import com.github.loafer.annotation.declaration.NullValueValidate; 4 | import com.github.loafer.annotation.processor.NullValueValidateProcessor; 5 | 6 | /** 7 | * Created by zhaojh on 2014/6/9. 8 | */ 9 | public class AnnotationExample { 10 | @NullValueValidate(fieldName = "testVar1") 11 | private String testVar1; 12 | 13 | @NullValueValidate(fieldName = "testVar2") 14 | private String testVar2 = "hello world"; 15 | 16 | public AnnotationExample(){ 17 | NullValueValidateProcessor.process(this); 18 | } 19 | 20 | public static void main(String[] args){ 21 | AnnotationExample annotationExample = new AnnotationExample(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /jasig-cas-client-custom-login/src/main/webapp/WEB-INF/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/test/java/com/github/quick4j/mybatis/mapper/builder/assistant/MappedStatementAssistant.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.mybatis.mapper.builder.assistant; 2 | 3 | import org.apache.ibatis.mapping.MappedStatement; 4 | import org.apache.ibatis.session.SqlSession; 5 | 6 | /** 7 | * @author zhaojh. 8 | */ 9 | public class MappedStatementAssistant { 10 | private MappedStatementAssistant(){} 11 | 12 | public static boolean hasStatementInSqlSession(String statementName, SqlSession sqlSession){ 13 | return sqlSession.getConfiguration().hasStatement(statementName, false); 14 | } 15 | 16 | public static MappedStatement getMappedStatement(String statementName, SqlSession sqlSession){ 17 | return sqlSession.getConfiguration().getMappedStatement(statementName); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /spring4-mvc-xml-complex/src/main/webapp/WEB-INF/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /reactor-spring/src/main/java/com/github/loafer/hello/consumer/HandlerBean.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.hello.consumer; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import reactor.event.Event; 6 | import reactor.spring.context.annotation.Consumer; 7 | import reactor.spring.context.annotation.Selector; 8 | 9 | /** 10 | * @author zhaojh 11 | */ 12 | @Consumer 13 | public class HandlerBean { 14 | private static final Logger logger = LoggerFactory.getLogger(HandlerBean.class); 15 | 16 | @Selector(value = "english", reactor = "@rootReactor") 17 | public void english(String s){ 18 | logger.info("Hello, {}", s); 19 | } 20 | 21 | @Selector(value = "chinese", reactor = "@rootReactor") 22 | public void chinese(Event event){ 23 | logger.info("你好, {}", event.getData()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /reactor-spring/src/main/java/com/github/loafer/hello/consumer/ResultHandlerBean.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.hello.consumer; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import reactor.spring.context.annotation.Consumer; 6 | import reactor.spring.context.annotation.Selector; 7 | 8 | /** 9 | * @author zhaojh 10 | */ 11 | @Consumer 12 | public class ResultHandlerBean { 13 | private static final Logger logger = LoggerFactory.getLogger(ResultHandlerBean.class); 14 | 15 | @Selector(value = "replyInEnglish", reactor = "@rootReactor") 16 | public void speakEnglish(String value){ 17 | logger.info("Hello, {}", value); 18 | } 19 | 20 | @Selector(value = "replyInChinese", reactor = "@rootReactor") 21 | public void speakChinese(String value){ 22 | logger.info("你好,{}", value); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /mybatis-sqlbuilder/src/main/java/com/github/quick4j/core/repository/mybaits/sqlbuilder/EntityAssistant.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.core.repository.mybaits.sqlbuilder; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author zhaojh. 8 | */ 9 | public class EntityAssistant { 10 | private static Map entityPersistentInfoMap = new HashMap(); 11 | 12 | public static EntityPersistentInfo parse(Class entityClass){ 13 | if(entityPersistentInfoMap.containsKey(entityClass)){ 14 | return entityPersistentInfoMap.get(entityClass); 15 | } 16 | 17 | EntityPersistentInfo persistentInfo = new EntityPersistentInfo(entityClass); 18 | entityPersistentInfoMap.put(entityClass, persistentInfo); 19 | return persistentInfo; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /reactor-spring/src/test/resources/spring-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/test/java/com/github/quick4j/mybatis/mapper/builder/assistant/EntityAssistant.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.mybatis.mapper.builder.assistant; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author zhaojh. 8 | */ 9 | public class EntityAssistant { 10 | private static Map entityPersistentInfoMap = new HashMap(); 11 | 12 | public static EntityPersistentInfo parse(Class entityClass){ 13 | if(entityPersistentInfoMap.containsKey(entityClass)){ 14 | return entityPersistentInfoMap.get(entityClass); 15 | } 16 | 17 | EntityPersistentInfo persistentInfo = new EntityPersistentInfo(entityClass); 18 | entityPersistentInfoMap.put(entityClass, persistentInfo); 19 | return persistentInfo; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-security-web/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | springSecurityFilterChain 9 | org.springframework.web.filter.DelegatingFilterProxy 10 | 11 | 12 | 13 | springSecurityFilterChain 14 | /* 15 | 16 | 17 | 18 | org.springframework.web.context.ContextLoaderListener 19 | 20 | -------------------------------------------------------------------------------- /jasig-cas-client-custom-login/src/main/webapp/success.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: zhaojh 4 | Date: 2014/5/30 5 | Time: 17:14 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <% 10 | String path = request.getContextPath(); 11 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; 12 | %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

Welcome !!!

21 |
22 | logout 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /mybatis-simple-common-mapper/src/test/java/com/github/quick4j/mybatis/mapper/builder/MapperBuilder.java: -------------------------------------------------------------------------------- 1 | package com.github.quick4j.mybatis.mapper.builder; 2 | 3 | import javassist.ClassPool; 4 | import javassist.CtClass; 5 | 6 | /** 7 | * @author zhaojh. 8 | */ 9 | public class MapperBuilder { 10 | private ClassPool pool = ClassPool.getDefault(); 11 | 12 | public Class build(String className, Class superInterface){ 13 | Class mapper = null; 14 | try{ 15 | CtClass superclass = pool.get(superInterface.getName()); 16 | CtClass ctMapper = pool.makeInterface(className, superclass); 17 | mapper = ctMapper.toClass(); 18 | }catch (Exception e){ 19 | String message = String.format("创建[%s]失败。", className); 20 | throw new RuntimeException(message, e); 21 | } 22 | return mapper; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spring4-mybatis/src/main/java/com/github/loafer/mybatis/simple/UserService.java: -------------------------------------------------------------------------------- 1 | package com.github.loafer.mybatis.simple; 2 | 3 | import com.github.loafer.mybatis.simple.mapper.UserMapper; 4 | import com.github.loafer.mybatis.simple.model.User; 5 | 6 | import javax.annotation.Resource; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * @author zhaojh 12 | */ 13 | public class UserService implements IUserService { 14 | 15 | private UserMapper userMapper; 16 | 17 | @Resource 18 | public void setUserMapper(UserMapper userMapper) { 19 | this.userMapper = userMapper; 20 | } 21 | 22 | @Override 23 | public User find(String id) { 24 | return userMapper.selectOne(id); 25 | } 26 | 27 | @Override 28 | public List find(Map parameter) { 29 | return userMapper.selectList(parameter); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /core-java-annotation/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | com.github.loafer 6 | core-java-annotation 7 | 1.0-SNAPSHOT 8 | jar 9 | 10 | core-java-annotation 11 | http://maven.apache.org 12 | 13 | 14 | UTF-8 15 | 16 | 17 | 18 | 19 | junit 20 | junit 21 | 4.11 22 | test 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /xml/src/test/resources/example.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |