JEECG and Elasticsearch integration solution problem help

    The first time I came into contact with jeecg (enterprise rapid development platform framework), the company asked me to integrate it with Elasticsearch, my development environment: jeecg3.7.3, elasticsearch2.4.0 version (because the development environment of jeecg is jdk1.7, so elasticsearch uses 2.4.0, later versions require jdk1.8).

        At first, I wanted to integrate es (Elasticsearch) directly into jeecg, but when I added the configuration file of es, various errors were reported when I started the jeecg project. The teacher (technical master), after 3 hours, still can't solve it, he told me that it was caused by the conflict of jar package, when I was about to give up, I suddenly saw that jeecg can be integrated with webService, and jeecg's pom The relevant dependencies of cxf-ws have been configured in .xml, and you can refer to them as long as you delete the comments.

        

        Then let's talk about the integration process of jeecg and webService.

        

        This is my project directory structure, let's make a brief description first. common is the intermediate transmission entity class system used for jeecg-master and cxf_ws_spring. I originally wanted to directly add the dependencies of the jeecg project to cxf_ws_spring, so that the intermediate entity class can be omitted, but it is found that an error will be reported during the implementation process.

        cxf_ws_spring is a project used to transmit with es, and it is also a service provider of webService. By configuring services, they can communicate with them, but there are some problems in the middle:

        1. For an entity class, I need to configure it in all three systems. The entity class of jeecg must be configured because it has hibernate annotations. I have tried to configure it directly in common for dependencies, but jeecg will report an error when starting the project. .

        2. When the form is added, deleted, modified and checked, I intercept it in the postHandler in the springmvc interceptor and communicate with the webService. Although the function can be realized, the operation feels a bit cumbersome. For example, to add methods, I need to judge different entities, and then configure the request paths of different webServices for communication.

        I hope someone can help me with the answer, is there a better way to do it, thank you all, thank you very much! ! !

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324745285&siteId=291194637