Solon existing 120 An ecological extension , This version focuses on detail polishing :

  • increase mybatisplus-solon-plugin plug-in unit
    // thus ,Solon  Has completed the mainstream at home and abroad 5 individual ORM Frame plug-in adaptation 
  • plug-in unit solon.validation, annotation Whitelist、NotBlacklist、Logined Add inheritable support
    //
    //Solon Specific lightweight and complete verification capability and verification extension mechanism
    //
    @Logined
    @Valid
    public class ApiBaseLogined {
    } @Controller
    public class DemoController extends ApiBaseLogined {
    @Numeric({"id"})
    @NotEmpty({"id","name","description"})
    @Mapping("addArchive")
    public void addArchive(Long id, String name, String description){
    //...
    } @Mapping("addArchiveItem")
    public void addArchiveItem(@Validated ItemModel item){
    //...
    }
    }
  • adjustment Routing rules , belt * The printing and mapping relationship of No. comes back
    @Controller
    public class DemoController {
    @Mapping("/*")
    public void all(){
    } @Mapping("/add") // be relative to *, Have priority matching
    public void add(){
    }
    }
  • adjustment When the communication port is occupied , Throw an exception instead
  • internationalization increase Content-Language Header information support , Make international control more friendly
  • internationalization increase Contextual Locale Injection support
    @Mapping("/demo")
    public void demo(Locale locale){ }
  • internationalization increase I18nService class
    @Controller
    public class DemoController {
    I18nService i18nService = new I18nService("i18n.user"); @Mapping("/demo")
    public String demo(Locale locale){
    return i18nService.get(locale, "user.name");
    }
    }
  • adjustment solon.data.cache.CacheServiceDefault Inner class , Renamed LocalCacheService
    @Configuration
    public class Config {
    @Bean
    public CacheService cache(){
    return new LocalCacheService();
    }
    }
  • plug-in unit solon.serialization.hession Renamed : plug-in unit solon.serialization.hessian
  • Adjust the serialization rendering scheme , No longer affected accept header influence
  • adjustment Validator Numeric , Empty means pass ( Whether it is allowed to be empty is determined by @NotEmpty Handle )
  • adjustment Aop.get(type) Change it to return bean || null
  • Cancel Aop.getOrNull(type) Interface , from Aop.get(type)
  • newly added Aop.getOrNew(type) return bean; Instead of the old Aop.get(type)
  • Interface CloudFileService increase delete Method
    @Controller
    public class DemoController {
    @Bean
    public void put(UploadedFile file){
    // Alibaba cloud oss or AWS s3 or Seven cattle Image upload ( Use Solon Cloud The interface will be simple )
    CloudClient.file().putStream(Utils.guid(), file.content, "image/jpg");
    }
    }
  • Repair solon.extend.staticfiles There will be .htm Of mine matching .xhtm The situation of
  • Optimization does not enable cache control ( Based on code control , It can be changed according to the startup parameters )
  • Optimize controls that do not enable transactions
  • Adjust the cache tag parameter usage policy , Lack of time is very convenient for users to find
  • increase @Inject("${xx.xx.ary}") List ary Support for
    @Controller
    public class DemoController {
    @Inject("${project.linkes}")
    List<String> linkes; @Inject("${project.details}")
    Map<String,String> details;
    }
  • Repair Props stay forEach when , Duplication may occur key The problem of

About Solon

Solon It's a light weight Java Basic development framework . emphasize , restraint + concise + The principle of openness ; Strive for , smaller 、 faster 、 A freer experience . Support :RPC、REST API、MVC、Job、Micro service、WebSocket、Socket And other development models . Short and sharp !

Solon Cloud Is a series of interface standards and configuration specifications , Count as Solon Distributed development suite based on .

Quickly understand Solon The material of :

《Solon Feature set , Compare with Springboot What's the difference? ?》

《Solon Cloud List of distributed service development kits , Feeling and receiving Spring Cloud Different 》

《Solon Ideas and architecture notes 》

Smaller :

kernel 0.1m, The smallest interface development unit 0.2m( Compare with Dubbo、Springboot The dependency package of , Small enough to be ignored )

Faster :

This machine http helloworld test ,Qps Can be up to 12 Wan Zhi Du . May refer to :《helloworld_wrk_test

More freedom :( Code controls freedom )

//  In addition to annotation mode , You can also do it manually on demand 
//
// Get configuration manually (Props by Properties Enhanced version )
Props db = Solon.cfg().getProp("db"); // Get the... In the container manually Bean
UserService userService = Aop.get(UserService.class); // Manual monitoring http post request
Solon.global().post("/user/update", x-> userService.updateById(x.paramMap())); // Manually add RPC service
Solon.global().add("/rpc/", HelloService.class, true); // Get one manually RPC Service consumer
HelloService helloService = Nami.builder().create(HelloService.class); // Manually add components to the container
Aop.wrapAndPut(DemoService.class);

Hello world:

//Handler  Pattern :
public class App{
public static void main(String[] args){
SolonApp app = Solon.start(App.class,args); app.get("/",(c)->c.output("Hello world!"));
}
} //Controller Pattern :(mvc or rest-api)
@Controller
public class App{
public static void main(String[] args){
Solon.start(App.class,args);
} // limit put Method type
@Put
@Mapping("/")
public String hello(String name){
return "Hello " + name;
}
} //Remoting Pattern :(rpc)
@Mapping("/")
@Remoting
public class App implements HelloService{
public static void main(String[] args){
Solon.start(App.class,args);
} @Override
public String hello(){
return "Hello world!";
}
}

attach : Project address

attach : Introductory example

Lightweight Java Basic development framework ,Solon & Solon Cloud 1.5.40 More related articles published

  1. Lightweight Java EE Development framework design system application architecture

    First of all Java EE summary The three frameworks often mentioned are :ssh Spring: Powerful components are glued together , Be able to take all of your java Function modules are combined in the form of configuration files ( And you don't feel spring The existence of ) Become one ...

  2. Java Strengthen the basic knowledge IO Stream notes 40: Special function of character stream buffer stream [ newLine() / readLine() ]

    1. Special method of character buffer stream BufferedWriter: public void newLine(): Line breaks are determined by the system BufferedReader: public String readLin ...

  3. Java Notes on the set framework of basic knowledge enhancement 40:Set Gather them together HashSet Store custom objects and traverse

    1. HashSet Store custom objects and traverse 2. Code example : (1)Student class , as follows : package cn.itcast_02; /** * @author Administrator * */ ...

  4. Java Basics -SSM And Spring Quick start

    Java Basics -SSM And Spring Quick start author : Yin Zhengjie Copyright notice : Original works , Declined reprint ! Otherwise, the legal liability will be investigated .    Spring It's an open source framework ,Spring Is in the 2003  A lightweight that emerged in 1997 Java ...

  5. Java Getting started with basic components

    A lot of new ones need to be launched recently JAVA project , However, many JAVA I'm not familiar with the related libraries , The project met with a lot of resistance , Stayed up for days and nights . Now the work at hand is basically finished , So I'm going to sum it up java The related tool library of , We need to use you in the future , good ...

  6. 40 Avenue Java Basic common interview questions and detailed answers

    Recently, I saw a variety of interview experience and questions circulating on the Internet , It's always a bunch of technical questions , But there is no answer . For this reason, I arranged in my spare time 40 Avenue Java Basic common interview questions and detailed answers , I hope all the big bulls find out what's wrong , Just leave a message . Eight bases ...

  7. Java Foundation Series 3: Multi thread super detailed summary

    This series of blog posts will show you how to move from entry to advanced , Study step by step Java Basic knowledge of , And go to war , Then learn about each Java The realization principle behind knowledge points , Learn more about the whole Java Technical system , Form your own knowledge framework . 1. Thread overview Almost all ...

  8. Lightweight Java EE Enterprise application practice ( The first 4 edition ):Struts 2+Spring 4+Hibernate Integrated development ( contain CD Compact disc 1 Zhang )

    Lightweight Java EE Enterprise application practice ( The first 4 edition ):Struts 2+Spring 4+Hibernate Integrated development ( contain CD Compact disc 1 Zhang )( National Award winning works upgrade , Four editions of cumulative printing 27 The circulation exceeds 10 Ten thousand copies of lightweight Jav ...

  9. Java Basic common English vocabulary

    Java Basic common English vocabulary ( common 70 individual ) ['ɔbdʒekt] ['ɔ:rientid] Oriented                              ['prəʊɡræmɪŋ] Programming OO: object ...

  10. Four 、Android The fourth day of study ——JAVA Basic review ( turn )

    ( from :http://wenku.baidu.com/view/af39b3164431b90d6c85c72f.html) Four .Android The fourth day of study ——JAVA Basic review That's how I learned Android Of ...

Random recommendation

  1. be based on MDK Of mbed Project establishment

    I prefer mdk As IDE To write code , and mbed As an open source project , There are a lot of excellent code that can be used for reference , For some time to come, we will mainly look at mbed Platform code and domestic code ebox Platform code         1   First log in mbed stay ...

  2. js- A new window opens the page

    window.open(basePath+"/web/homeIndex?code="+code); 1. Hyperlinks <a href="http://www.xxx.ne ...

  3. JS: Operation style sheet 3: Inline and outer chain styles

    var box = document.getElementById("box"); box.style. attribute ; You can only read and modify inline styles . // Accessing element styles 2, Operate on the external chain style sheet do ...

  4. codevs1688 Find the reverse order pair

    Title Description  Description Given a sequence a1,a2,…,an, If there is i<j also ai>aj, So we call it a reverse order pair , Find the number of pairs in reverse order Data range :N<=105.Ai<=105. ...

  5. es6 Template string The problem record

    Since ancient times, there has been no picture, no truth , I hope all bloggers can , With a picture ! The interface uses join Spliced , When the cycle td An empty string will be generated when , A comma will appear in the interface , Although the function block is realized , But there is always a flaw in the beauty , Then the idea is to replace ...

  6. Zookeeper And Kafka Cluster building

    One : Environmental preparation : The physical machine window7 64 position vmware 3 A virtual machine centos6.8  IP by :192.168.17.[129 -131] JDK1.7 Installation configuration Configure password free login between virtual machines install ...

  7. placeholder effect

    <!DOCTYPE HTML> <html lang="en-US"> <head>     <meta charset="UT ...

  8. stay vue-cli Reference public filters in filter

    In actual project development , Global filters declared in a component Vue.filter It can't be used in other components , therefore , I think as long as the filter is called more than twice or may be called more than twice , It should be written to a unified filter file , Convenient for unified calling . below ...

  9. Real inspection customer tailoring sql

    '; --select * from TB_ADDBOMWG_LOG; --SELECT * FROM TB_MAN_ROUTING_QM; SELECT * FROM IN_ITEM WHERE I ...

  10. maven Warehouse address configuration

    # background maven The central repository is abroad , The visit was slow , General domestic mirror image , Here is alicloud's  http://maven.aliyun.com/nexus/content/groups/public My previous approach was ...