All Projects → twogoods → tiny4j

twogoods / tiny4j

Licence: other
IOC, AOP, REST...

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to tiny4j

hasor
Hasor是一套基于 Java 语言的开发框架,区别于其它框架的是 Hasor 有着自己一套完整的体系,同时还可以和先有技术体系做到完美融合。它包含:IoC/Aop容器框架、Web框架、Jdbc框架、RSF分布式RPC框架、DataQL引擎,等几块。
Stars: ✭ 938 (+6153.33%)
Mutual labels:  ioc, aop
LSFramework
手写山寨版spring学习aop、ioc思想的demo,没看过spring的源码,因为实在是太庞大了,参考部分网上博客及开源代码完成。
Stars: ✭ 53 (+253.33%)
Mutual labels:  ioc, aop
Summer
这是一个支持分布式和集群的java游戏服务器框架,可用于开发棋牌、回合制等游戏。基于netty实现高性能通讯,支持tcp、http、websocket等协议。支持消息加解密、攻击拦截、黑白名单机制。封装了redis缓存、mysql数据库的连接与使用。轻量级,便于上手。
Stars: ✭ 336 (+2140%)
Mutual labels:  ioc, aop
Java Bible
🍌 我的技术摘要
Stars: ✭ 2,919 (+19360%)
Mutual labels:  ioc, aop
Doodle
A Simple Java MVC Framework。提供Bean容器、Ioc、Aop、MVC功能
Stars: ✭ 90 (+500%)
Mutual labels:  ioc, aop
Blog.core
💖 ASP.NET Core 6.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
Stars: ✭ 3,542 (+23513.33%)
Mutual labels:  ioc, aop
Jodd
Jodd! Lightweight. Java. Zero dependencies. Use what you like.
Stars: ✭ 3,616 (+24006.67%)
Mutual labels:  ioc, aop
thinking-in-spring
Spring source code reading
Stars: ✭ 105 (+600%)
Mutual labels:  ioc, aop
Thunder
Stars: ✭ 70 (+366.67%)
Mutual labels:  ioc, aop
Koatty
Koa2 + Typescript = Koatty. Use Typescript's decorator implement IOC and AOP.
Stars: ✭ 67 (+346.67%)
Mutual labels:  ioc, aop
java-bible
🍌 我的技术摘要
Stars: ✭ 2,950 (+19566.67%)
Mutual labels:  ioc, aop
Puresharp
Puresharp is a Framework that provides the essential APIs (AOP, IOC, etc...) to productively build high quality (.NET 4.5.2+ & .NET Core 2.1+) applications through reliability, scalability and performance without no compromise
Stars: ✭ 120 (+700%)
Mutual labels:  ioc, aop
tsioc
AOP, Ioc container, Boot framework, unit testing framework , activities workflow framework.
Stars: ✭ 15 (+0%)
Mutual labels:  ioc, aop
Martian
🎨 Martian 是一个基于NIO的JavaWeb编程框架,可以帮助你快速的开发后端服务
Stars: ✭ 320 (+2033.33%)
Mutual labels:  ioc, aop
CNeptune
CNeptune improve productivity & efficiency by urbanize .net module with meta-code to lay foundation for frameworks
Stars: ✭ 30 (+100%)
Mutual labels:  ioc, aop
Spring Learning
Spring 学习笔记,通过例子展示和剖析实现机制
Stars: ✭ 346 (+2206.67%)
Mutual labels:  ioc, aop
Farseer.Net
Provides consistent standard use of common components of the .Net Core language
Stars: ✭ 42 (+180%)
Mutual labels:  ioc, aop
Hasor
Hasor是一套基于 Java 语言的开发框架,区别于其它框架的是 Hasor 有着自己一套完整的体系,同时还可以和先有技术体系做到完美融合。它包含:IoC/Aop容器框架、Web框架、Jdbc框架、RSF分布式RPC框架、DataQL引擎,等几块。
Stars: ✭ 713 (+4653.33%)
Mutual labels:  ioc, aop
Uioc
IoC Framework for us
Stars: ✭ 112 (+646.67%)
Mutual labels:  ioc, aop
Nutz
Nutz -- Web Framework(Mvc/Ioc/Aop/Dao/Json) for ALL Java developer
Stars: ✭ 2,422 (+16046.67%)
Mutual labels:  ioc, aop

tiny4j

会点java,做点web,基本也就是spring全家桶,都是IOC,AOP,MVC这样的概念,所以打算自己折腾一个,实现最基本最常用的一些功能。

IOC

简单使用如下:

ApplicationContext applicationContext = new ClassPathXmlApplicationContext("test.xml");
ServiceBean serviceBean=(ServiceBean)applicationContext.getBean("testService");
System.out.println(serviceBean);
serviceBean.service();

ServiceBean serviceBean2=(ServiceBean)applicationContext.getBean("serviceBean");
System.out.println(serviceBean2);
serviceBean2.service();

//全局的容器上下文
ApplicationContextHolder holder=applicationContext.getBean("applicationContextHolder", ApplicationContextHolder.class);
System.out.println("holder get bean : "+holder.getBean("serviceBean"));

详细说明

rest

不多说直接上controller代码

@Api("/base")
public class TestController extends BaseController {

    @Value("${user.name:test}")
    private String name;

    @Inject
    private UserService userService;

    @RequestMapping
    public String index() {
        userService.query();
        return name;
    }

    @RequestMapping(mapUrl = "/test/{id}", method = HttpMethod.GET)
    @CROS(origins = "www.baidu.com", methods = {HttpMethod.GET}, maxAge = "3600")
    public String patgTest(@PathVariable("id") String id) {
        return id;
    }

    @RequestMapping(mapUrl = "/test", method = HttpMethod.GET)
    @InterceptorSelect(include = {"aInterceptor"}, exclude = {"bInterceptor"})
    public String interceptorTest() {
        return "haha";
    }


    @RequestMapping(mapUrl = "/index")
    @CROS
    public String paramTest(@RequestParam("id") long id, @RequestParam("name") String name) {
        return name + "---" + id;
    }

    @RequestMapping(mapUrl = "/user/{id}", method = HttpMethod.PUT)
    @CROS
    public User insert(@PathVariable("id") long id, @RequestBody User user) {
        return user;
    }
}

是不是感觉很熟悉,SpringMvc既视感...
现已支持SpringBoot风格的可执行jar,请看详细说明

TODO

  • 反射优化

AOP

TODO

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].