1 Star 0 Fork 41

YangMain / Mars-java

forked from yuye / Martian 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Mars-java是一个javaWeb开发框架,以netty作为http服务,支持AOP,IOC,MVC,JDBCTemplate 并且集成了Mybatis,还支持微服务开发,是一款很小,但是功能还算完善的框架

其他子项目

我能做什么

  • 搭建简单,开箱即用
  • 使用netty做的http服务
  • 使用JWT做的会话管理
  • 声明式事务
  • 支持AOP, IOC, MVC, JdbcTemplate, Mybatis
  • 用 Mars-cloud 可以分布式部署
  • 用 Mars-config 可以远程配置【迭代中】

只需要一个jar包

<dependency>
    <groupId>com.github.yuyenews</groupId>
    <artifactId>mars-start-pure</artifactId>
    <version>最新版,可看文档</version>
</dependency>

一个配置文件

#配置端口号(默认8080)
port: 8088

#配置持久层
jdbc:
  #配置数据源,必须是阿里巴巴的 druid数据源
  dataSource:
      name: dataSource
      url: jdbc:mysql://10.211.55.5:3306/test?serverTimezone=GMT%2B8
      username: root
      password: rootroot
      driverClassName: com.mysql.cj.jdbc.Driver

然后从main方法启动

public class Start {
    public static void main(String[] args){
        StartMars.start(Start.class);
    }
}

除此之外再无任何配置文件

  • 很多框架宣称自己没配置文件,其实是把配置放在了java类里面,而Mars-java只有一个yml,比java类更加灵活,更省代码
  • Controller,Bean,DAO,单表操作都可以使用纯注解完成,而且及其简洁

帮助文档

Document

简单对比

名称 AOP IOC MVC 持久层 配置文件 启动方式
Mars-java OK OK OK 支持mybatis,并有自己的JDBC 只有一个,并支持远程配置 Main方法
Springboot OK OK OK 支持大部分主流框架 只有一个,并支持远程配置 Main方法 或者 War包+Tomcat
The MIT License (MIT) Copyright 2019, Yuye Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

这是一个javaWeb开发框架,构建非常简单,导入一个jar包,编写一个yml配置文件,就可以从main方法启动了,单表操作只需要一行注解,支持微服务开发,是一款很小,但是功能还算完善的框架 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/yangmain/Mars-java.git
git@gitee.com:yangmain/Mars-java.git
yangmain
Mars-java
Mars-java
master

搜索帮助

14c37bed 8189591 565d56ea 8189591