Git Product home page Git Product logo

demo's Introduction

这里保存的都是一些练手用的demo.

rest-demo项目基于spring-boot无xml配置

|- src-main-com.example.Application : spring-boot的启动类,包含序列化方式的配置、spring-security策略配置、 tomcat服务器策略配置、属性文件读取策略配置。

|- spring-security简单用户名密码/角色验证demo:src-main-com.example.config.SpringSecurityUserDetailConfig;

|- jedis连接redis配置:src-main-com.example.config.LocalRedisConfig; *redis具体操作示例为 src-main-com.example.dao.PersonDaoImpl; *redis pub/sub 的消息接收器示例为 src-main-com.example.service.RedisListenerServiceImpl; 该接口的方法命名需遵循规定的命名规范, 具体参考spring-data-redis的官方文档。

|- mongodb连接配置:src-main-com.example.config.LocalMongoConfig; *mongo操作示例为 src-main-com.example.dao.EmpDaoImpl; 这里使用了spring-data-mongo提供的orm模板来对mongodb中的document和pojo进行orm映射; 当然这种做法在简单mongodb数据操作时还是可取的。

|- mysql连接配置:src-main-com.example.config.LocalMysqlConfig; *这里使用了mybatis的注解@MapperScan(basePackages ="com.example.mapper") 来达到无需在mapper接口中显式注入sqlSessionFactory的效果,查询直接调用mapper接口的方法即可。 对应的mapper接口示例为 src-main-com.example.mapper.MemberMapper; 查询的具体示例为 src-main-com.example.service.MemberServiceImpl;

|- restful的demo位于:src-main-com.example.rest包下

|- netty的demo位于:src-main-com.example.netty包下

|- 文件操作工具类:src-main-com.example.util.FileUtil *使用三种方法对文件进行读取、写入操作。

rest-demo项目中的src-test中包含了大量的数据结构、算法、Stream接口、多线程操作等的demo和测试类;

rest-client项目是对apache httpClient http操作接口的封装,用于其他项目以rpc的方式进行调用

demo's People

Contributors

bloodkilory avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.