之前公司是一个tomcat启动一个模块,到行方要求使用weblogic
启动一个模块,在weblogic页面点击部署然后点击安装
1.jar包缺失
主要缺失的是tomcat相关的jar包,放入lib目录下就行。
2.强校验
[FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by @Consumes and @Produces annotations at Java methods
在tomcat下可以发布,webLogic失败。报错信息如下:
这两个方法是Arango提供的api,因为@Path相同Weblogic无法识别。
解决方法:选择其中一个方法,批量插入或单独插入,注释掉另一个方法。
3.nginx的转发
weblogic域内共用一个端口,各个模块默认以端口号/模块名区分
nginx配置文件如下:
upstream weblogic-app-online {
server 127.0.0.1:7001 max_fails=2 fail_timeout=130s;
}location /api/account {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;proxy_pass http://weblogic-app-online/account/api/account/;
}location /api/search {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;proxy_pass http://weblogic-app-online/search/api/search/;
}