oim-server is the server side of the OIM chat system, developed in Java language and using Spring Cloud microservice architecture. As long as the machine is sufficient, users are not a problem.
The OIM service is a set of instant messaging servers developed using the Java language and based on the spring cloud microservice system. Deployable solutions are provided from stand-alone machines to micro-services, and both stand-alone machines and micro-services can be switched smoothly, and the client can be unaware of service changes.
Features
oim-server allows you to develop instant messaging interfaces like spring mvc. For developers who have web background development experience but no instant messaging server experience, they can easily convert and are compatible with spring web interfaces. Example as below
Request interface @RestControllerpublic class UserController {/** * * Login
* Date 2019-02-17 12:26:38
* * @param user * @since 1.0.0 */@ActionMapping(value = " /user/login") // This route can also use http post to request public User login(@Define("body.user") User user) { // "body.user" (this body is the body field in json, Not the body of the http protocol) // It is the json attribute path of the message body in http or tcp {"body":{"user":{}}}// ...Omit the implementation content return user;}}
Catalog description
|__oim-server-run #Java service|__cloud #Microservice running version|__common #Publicly dependent jar |__oim-server-element-basic-* #These are the parts that both stand-alone and microservices depend on, including some abstract definitions. Services and stand-alone machines have different implementations |__oim-server-element-cloud-* #These are the dependencies required by microservices, some implementations for microservices|__service #Each running microservice |__core #Mainly technical management type microservices Services such as: registration center, gateway, etc. |__action #Collect the interface addresses of all services, so that the gateway can directly access the corresponding service through the interface address without configuring the service name |__admin #Just integrated spring boot admin |__center #Registration center| __gateway #Gateway|__net #TCP, WebSocket and other long-term connection services for instant messaging|__control is used to manage (net-work) user client long-term connection services|__work user client long-term connection services|__support #Public support services such as: file upload |__file |__system #Configuration, common data, etc. for the entire system |__setting # |__work #Business service (because business is too long, there are other places where this name is easy to use) |__chat #Chat business |__contact #Contact person| __core #Core: User|__group #Group|__portal #Service address entry|__single # |__oim-server-single-main # Because the functional modules of stand-alone and microservices are shared, here are some abstract stand-alone implementations |__oim- server-single-running #Start service configuration|__oim-server-web #Vue background management interface
OIM development instructions
1. Environmental requirements
JDK 1.8.0_xxx
DB supports MySQL Oracle SQL server MySQL 8.0 is recommended
Microservices also need the following
Redis
RaadfdsitMQ
2. About the microservice version and its use
The business code and business code of the microservice version are shared, so the business modules are all in the microservice directory. There are only differences in the processing of IM long connections, so stand-alone machines and microservices need to be handled differently.
The place is abstracted into an interface and implemented in different startup services.
3. Regarding some dependencies that cannot be downloaded
Because some dependencies have not been published to the maven central library, but are in my private library, they cannot be configured in the maven global configuration file (usually in the user directory.m2/setting.xml)
Mirror service (comment or delete the middle part)
The private library maven configuration project has been configured
4. About database scripts
Just create the database first, modify the database configuration, and start automatic table creation. There is currently a problem with creating tables in the default H2 database. It is recommended to use MySQL 8.0.