I am trying to build a Springboot App and deploy it onto a Flink Cluster. The aim is to expose a REST endpoint so as to serve data from a dynamic table/continuous query. But when I try to package the app as a fat JAR and deploy , the Flink job manager does not recognize the main class and throws exceptions/errors. has anyone managed to acheive this. I am using Springboot 3.x and Gradle as the build system.
Related
I prefer to use gradle with Spring Boot. I have found resources about deploying to Azure with the Maven Plugin for Azure App Service Web Apps. How would one take an approach with gradle as a build system?
Well you need to separate deployment and build.
You can use Azure build pipeline task to build with gradle.
Part of that build you can create artifacts which contains your app
Then create release which will deploy jars to azure app service
We have a a java/jsp servlet application running on weblogic today.
I would like to convert this application to a spring-boot application?
The app uses ANT for build and i would like to also figure out all jar dependecies and convert this app to a maven application.
I also have standalone java applications running on commandline triggered by a cron job that i would like to do the same .
Please advise on how I ca do this.
Sri
I can't find any example or article how can the continuous delivery pipeline look like when we are using Spring Boot + Jenkins.
In Java EE I usually do it like this:
Push changes to repository
Jenkins checks for changes every 5 minutes
if there was a change, Jenkins pulls the sources and run maven build
using wildfly maven plugin I run redeploy on server
And generally I wonder what to do in last point when I'm using Spring Boot. Application is packaged into single JAR and run in separate process so in Spring Boot there is actually no such thing like redeploy. Do I have to write some script to kill old process first and then run the new artifact? Or maybe there is something like "spring boot cli" where I could manage all running spring boot apps?
You need to kill old process and run new process as a service.
It is all very well explained here Spring Boot application as a Service.
There is nice ssh plugin for jenkins that we use : https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin
Copy jar to the server
Stop old service
Run new service
EDIT : Added Spring boot reference for running spring boot as a service - http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html #Vaelyr
I am new to STS. I am creating RESTful Web Services with the Jersey implementation using the Gradle Build tool. Can any one tell me how to create or consume REST in STS?
Spring Boot provides many sample projects on GitHub that can be used for getting started on a new project. In your case the Jersey sample project should provide you with a good starting point.
After download the sample source code you can import the project into STS using File -> Import and select Existing Maven Project.
I want to develop spring (3.1.2) and hibernate (3.6.4) application and deploy it in WSO2 application (5.2.1) server.
I tried it as service such as the spring service and the AAR service,but unfortunately all of them couldn't persist an object in data base.I encountered with differents bugs such as "java.lang.NoClassDefFoundError" and..., I found out the problem, caused by jar files in my project and inconsistency with WSO2 lib. After I add my lib in WSO2 lib folders the problems are persisted. Do you have any hint?
You should probably want to deploy your application as a webapp. By deploying it as a webapp, you can avoid the incompatibility of libs between wso2 and your application. You can see some spring related samples in AS_HOME/samples/Jaxws-Jaxrs.
By default, webapps do not see the org.springframework.* packages that are available in wso2 repository/components/plugins folder. This is configurable. You might probably want to read this all in one docuementation on wso2 webapp classloading.