Giter Site home page Giter Site logo

xy-ctx's Introduction

简单的Bean容器实现

  • 依赖注入
  • 循环依赖
  • 简单的多独立数据源

主要基于上面的三个条件来实现了容器的管理,便于使用 Mybatis 连接多个Database,实现数据库的访问。

可以用于进行代码验证性开发。

实例见 src/test/java/..../MyAppTest

已实现:

  • 通过 @Dependcy 注解来实现对象的定义信息的收集和对象的注入
  • 通过 @Autowire 注解来实现已经在容器中的对象的依赖注入
  • 通过 BeanGetter t; 来实现注入
  • 通过 BeanConfigure 接口实现类中使用@Bean标注方法来提供bean的实例,仿SpringBoot的方式

未实现:

  • 没有进行包扫描功能的实现

目前使用:

  • 主要是用于简单的测试,比如访问数据库,进行简单的业务代码的验证。
  • 事务可以通过手动的方式来进行管理,如果是简单的测试,无需考虑事务问题。

已经支持简单的web实现,当然实现方式很简陋,甚至可以说是demo级别,不过已经满足我测试的需求了。

  • 支持了SqliteDB的基本操作的支持
  • 支持了一套简单的SQL构建的工具,不过缺陷是很明显的。

2023-01-17

  • 需要修改SQL构建工具的实现方式,支持动态实现的版本,和静态版本的并存,因为涉及到的兼容
  • 需要动态SQL构建之外,需要考虑以下配置的可能性,也就意味着实例化 lazy化实现,这样可以实现提前配置,后续使用的时候使用约定配置

xy-ctx's People

Contributors

nanyang02 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.