Where the Spring boot project is deployed to IBM WebSphere 8.5.5 needs attention

Source: Internet
Author: User
Tags websphere application server

Encounter problems
    对Spring Boot观察了好久,最近终于开始有机会使用Spring Boot来做项目的开发,Spring Boot不需要部署,用jar包模式运行的机制,非常适合做快速开发,能在项目演示和迭代期间起到快速的推进作用。整体来说是一个非常好快速开发框架。    今天着重要说一下的是Spring Boot项目打包成war包,部署到J2EE容器,特别是Websphere遇到的问题。    首先Spring Boot项目build的war包,在Tomcat 7,8,Jetty等容器下,不论是嵌入到eclipse中,还是部署运行都是ok的.在Websphere 8.5.5 liberty profile中运行也没有问题,但是在 Websphere 8.5.5的正式版本中,就有几个地方需要注意,否则Spring Boot相关的包不会被服务器load,导致项目部署好了所有的访问都是404.
Solutions
    1. Package a project with the MAVEN packages

    2. Create a shared library, specify the project-related jar package storage path, and copy the jar files from the Lib folder in the war package to that path

    3. Use eclipse repackaging to exclude dependent MAVEN libraries from packaged files, or remove all jars directly from the packaged war file

    4. Modify the ClassLoader order of the deployment project

    1. So far, basically the project will work, if you continue to 404, restart WebSphere, or click on the startup behavior of the project (here I guess, the item will be re-loaded again by the container, which will load all the relevant jar files)

Related versions
    • Spring Boot Version 1.3.3
    • IBM WebSphere application Server Network Deployment 8.5.5.1
    • JDK7

Where the Spring boot project is deployed to IBM WebSphere 8.5.5 needs attention

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.