2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-10-12 20:11:17 +08:00
2019-03-14 20:59:09 +08:00
2019-06-10 22:40:26 +08:00
2019-10-12 20:11:17 +08:00
2019-10-09 16:51:11 +08:00
2019-10-09 16:51:11 +08:00

The Js framework has React, Vue, AngularJS, but the Java framework has only one Spring. Many people say that I am making wheels, but I don't think so, so... it's time to challenge Spring, I hope everyone can get involved, contribute code, and give Java developers another option.

Other project

What can I do

  • Simple to build, out of the box
  • http service using netty
  • Session management using JWT
  • Support AOP, IOC, MVC, Mybatis, transaction management
  • Distributed deployment via Mars-cloud
  • Remote configuration via Mars-config [iteration]

Only need one jar package

<dependency>
    <groupId>com.github.yuyenews</groupId>
    <artifactId>mars-start-pure</artifactId>
    <version>[The latest version, you can see the document]</version>
</dependency>

A configuration file

port: 8088

jdbc:
  #Configure the data source, it must be Alibaba's druid data source
  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

Then start from the main method

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

No other configuration files other than this

  • Many frameworks claim that they don't have a configuration file. In fact, they put the configuration in the Java class, and Mars-java has only one yml, which is more flexible and more code-saving than the Java class.
  • Controller, Bean, DAO, single table operations can be completed with pure annotations, and it is simple

----------Upgrade the Mars-java project to the Mars-cloud project and its simplicity----------

Just need to change one start

<dependency>
    <groupId>com.github.yuyenews</groupId>
    <artifactId>mars-cloud-start</artifactId>
    <version>[The latest version, you can see the document]</version>
</dependency>

Add 5 rows configuration

cloud:
  # Service name, the name of the load balancing cluster of the same service must be the same, and must be unique between different clusters.
  name: cloud-client1
  sessionTimeout: 10000
  # Whether as a gateway
  gateWay: yes
  timeOut: 10000
  # Zookeeper address, multiple addresses are separated by commas, 
  # multiple addresses, must be double quotes, otherwise parsing yml files will be wrong
  register: 10.211.55.9:2180

Very easy to learn

Document

Document

Expansion pack

Support redis connection

Encapsulates Email, MD5, AES and other tool classes and integrates hutool

Extension package

Simple comparison

name AOP IOC MVC ORM configuration file startup method
Mars-java OK OK OK MybatisJDBCTemplete Only one and supports remote configuration Main Method
Springboot OK OK OK Support most mainstream frameworks Only one and supports remote configuration Main MethodWar+Tomcat
S
Description
No description provided
Readme MIT
1.5 MiB
Languages
Java 100%