Deploy Spring Boot project to WebSphere 8.5.5 - spring

I'm trying to deploy my spring boot project (made by spring initializr) with maven (but same issue with gradle) on WebSphere Application Server 8.5.5 but it seems impossible to me.
Every-time I try to add to server from "Add and Remove" it says "There are no resources that can be added or removed from the server".
So I tried changing Dynamic Web Module on Project properties --> project facets but nothing changed.
Is it possible to deploy on WAS 8.5.5?

I found a similar reported issue here: Cannot 'Add and Remove' Maven Project with Websphere 7 on RAD 8.5.
I completely removed my project from RAD. I then extracted zip file from Spring Initializr to create a Maven project. I used "mvnw eclipse:eclipse" command and it successfully created build. I imported that as a general project to RAD.
I then clicked on project. Clicked on properties. Clicked on project facets. None were available, but it prompted me to create them and I did. From there, I selected Dynamic Web Module facet (and also JAX-RS, but I'm not sure if you'll care about that one). I clicked apply and close.
After this, I was able to add and remove resource to Websphere server. I don't know if this is preferred steps or not. I am learning, just as you are. But, it appeared to work.
I specified Java 8 Jar in Spring Initializr for packaging. Maven version is 3.8.4. Spring Boot 2.6.5 (it was pre-selected for me). I am using RAD 9.7 and Websphere server that is stood up in IDE is version 8.5.5.

To deploy spring boot to WebSphere 9 you would want to choose War packaging and Java 8. The zip file from the spring initializr includes a Help.md file with links to helpful documentation. After you extract the zip file, use File -> Import existing maven project into a new workspace.

Related

Converting existing project to Spring boot project in InelliJ

I have an existing project. I need to make it a Spring boot based project and I am using IntelliJ CE.
What would be correct procedure for doing it?
Edit:
Project has no initial structure. It is a totally empty project. So no existing modules etc.
Spring Boot is an Ultimate feature, so first you would need to try/buy the IntelliJ IDEA Ultimate.
From there, you can add Spring support to existing project modules or use the Spring Initializr wizard to select the necessary configuration when creating a new project or module.
In your maven pom.xml or build.gradle file, I would add the spring boot starter dependency:
spring-boot-starter (the group id is org.springframework.boot)
If the application is a web application, I would also add the web starter spring-boot-starter-web also with the same group id (org.springframework.boot)
For convenient features, applying the spring boot plugin would help in creating a runnable jar with all required dependencies bundled called a fat jar.
A great tool I use is the spring boot project generator. It allows you to configure the modules you want and create a project template.
Spring Boot requires IntelliJ IDEA Ultimate. If you want to use IntelliJ CE, please create a project using Spring Initilizer then import the same to your IntelliJ CE (File -> Open -> Choose the project root folder). After you import the project, wait for some time so that IntelliJ can download the dependency and build your project. You can check from (Build -> Build your project). Then find the main class of spring boot and run it using the green play button

Is spring-boot jar can be work with existing spring session based project ? . is it possible?

I try put spring-boot jar file into spring session based application. we have enterprise edition, so we planned to add new features as jar. is it possible?.
give your instructions how to do it?
we developed and include in spring project but it was not call the repository.
it shows the "creating error in bean message".

Which maven project i choose for creating spring boot web applications in netbeans?

After a lot of googling i created two sample spring boot projects with maven & netbeans.
First Maven -> web application
Second Maven -> Java application
Two projects are working fine.
Which maven project i choose for creating spring boot web applications in netbeans?
Which is best & why?
You can install the NB SpringBoot plugin to create a Spring Boot projects from Netbeans. (http://plugins.netbeans.org/plugin/67888/nb-springboot)
Or you can create the project structure from https://start.spring.io/ and import it in Netbeans.
Also you can choose create a maven web application if you want to build a web application, but if you choose maven Java Application this will create a console application.
The choice you choose depends on your need

Spring Boot: change from Java Servlet 3.1 to 3.0

In Eclipse (STS) I created a project as follows:
File -> New -> Spring Starter Project
The settings are (among others):
Type: Maven Project
Packaging: War
Java Version: 1.8
Language: Java
Boot Version: 1.3.0
Dependencies: Web
In the project facets it leads to Dynamic Web Module = 3.1, however I need 3.0.
Manually setting it to 3.0 leads to "Cannot change version of project facet Dynamic Web Module to 3.0".
Besides this error message I am sure this is not the right way to change it because the project will be shared to others.
I guess there is a maven way.
Maybe the solution is somewhere here: http://docs.spring.io/spring-boot/docs/1.3.0.RELEASE/maven-plugin/plugin-info.html.
Unfortunately Spring Boot and Maven are not my special topics (yet).
Not the correct way but, the easiest way to fix that issue is 'Delete' that error from the 'Problems' tab. It will be removed and your code will be compiled on STS. But, it may come back at some point then just delete that error again.

Replacing/deploying only the changes in the already depolyed ear in Jboss 7

I am deploying the ear file each time when i making a changes as my project is multi-module and it is really tedious to upload/deployed the entire ear again in Jboss 7.Is there any way to replace only the changed jar/war/files in the already deployed ear in jboss without deploying the entire ear file again.
Thanks.
You should consider using JRebel - it allows reloading changes. After you compile any class it will automaticaly reload it, supporting modern frameworks (like reloading spring beans, etc) and application servers (JBoss included). It works as a java agent. You will find more details on producent site: http://zeroturnaround.com/software/jrebel/features/
To introduce JRebel in Maven project you just need to add jrebel-maven-plugin

Resources