Spring MVC portlet not deploying - spring

I wrote a simple spring mvc portlet and I copied to "deploy" in liferay it is not automatically getting deployed to tomcat's webapp folder.
Further it is deploying only when the tomcat is restarted.
Also the portal having the spring mvc portlet is not automatically refreshed with the new content.
I had to remove it and add it again.
I tried with a simple portlet app and everything happens automatically by default.
Can you tell me what I am missing here in spring mvc portlet app.
Any suggestions would be helpful..

This link from liferay forum might help you.
Just check if the property auto.deploy.interval=0 or auto.deploy.enabled=false is not set.

Related

Spring boot web app - not able to pick the static content

Spring boot web app with angular bundle was working fine earlier
Then I added a gradle dependency which is a library that is built within my organization to achieve some api calls. And after that the view/angular build is not picking up by spring boot application.
My project structure looks like below
web-app\
src\main\java\
WebApplication.java
\resources\public\index.html
\public\main.5214684651aera5146.js
\public\styles.3asd44654e1asd135fsdf.js
\public\other-angular-build-files
application.properties
I haven't added any view controllers/resource handlers by implementing WebMvcConfigurer. Spring boot was able to pick the index.html file as welcome page and I was able to see the page on http://localhost:8080.
But now it is not working, I have gone though below article and tried with different location of view - public, static, resources, META-INF\resources but nothing workout.
https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot
Can someone help how can I debug this issue or override MVC config so that my spring boot should pick the index.html as the welcome page.
In addition to M. Deinum answer you can try to restrict #ComponentScan only in your app and manually create beans from classes from library

How to create helloworld example with spring web mvc?

I’m new with spring web mvc I tried to create new project spring web mvc framework in eclipse ide but it’s still show error sometimes it error status 404 on run time with tomcat I’ve tried to search a lot but still the same. Please anyone help give me the step bye step to create spring web mvc in eclipse ide.
If you start learning with spring web mvc please follow this link

how to add an external spring application as a portlet to a liferay portal

I have developed a Primefaces- Spring Application.
I have installed Liferay IDE/Plugings/server. I Want to deploy the Primeface-Spring application a s a portlet to my Liferay Portal. How do i achieve it? Please help.
Mmm... if I well undestood, you create a standard web application and need to deploy it as a portlet?
I'm sad to say that it is impossible: you need to convert your webapp to a "portlet application" before deploy.
By the way Liferay tries to meet your need... you can deploy your webapp inside your application server like any other web application. So your webserver will be able to serve Liferay (in root context) or your application in its context. Then you have to embed it inside a liferay "Embedded page": just create an "Embedded" page using your Liferay admin features.
This solution uses an iframe, so if you prefer you can try to use a "web-proxy" portlet (to integrate your code server side): see here http://www.liferay.com/it/community/wiki/-/wiki/Main/Web+Proxy+Portlet
Next time you develop a portlet application a good starting point is to understand basics on portlet lifecycle, then to develop it directly thinking on a portlet.
It should be possible to deploy your PrimeFaces+Spring web application as a portlet in Liferay using Liferay Faces Bridge. The purpose of the bridge is to provide developers with a way to develop JSF applications without being concerned about the Portlet API. The Liferay Faces project has a primefaces4-portlet demo and a jsf2-spring-portlet demo that you can download in order to verify that these technologies work in your Liferay Portal environment.

How i convert spring project to liferay?

I developped an application (spring, hibernate) and i must convert it to liferay Project
how i can do it?
please could you help me
thank you.
A solution would be to build your application using Spring Portlet MVC, the Portlet version of Spring MVC. Then you will be able to deploy your application as a Portlet on Liferay.
Spring hibernate and liferay have nothing in common.
Spring and hibernate are frameworks : one for managing bean, other for database mapping (orm).
Liferay is a portal.
So you can't migrate automatically a project to liferay.
BUT, you can :
integrate your project using social widgets into a liferay portal
if your project have some standard portlets, you should have no problem to copy them in a liferay environment
for other case, you will need to rewrite your code to adapt to liferay api

how to invoke Spring Portlet

I have been reading and following the spring doc on how to create Spring Portlet and I have most of the configurations and a basic controller done. But I don't know how to invoke it. In Spring MVC, we can config a url so that we can invoke that controller. but how is it done in Spring Portlet? It doesn't mention in the documentation, I think.
I also read the following article and it doesn't say how to config the portlet either.
http://www.ibm.com/developerworks/websphere/library/techarticles/0802_patil-pt1/0802_patil-pt1.html
In Oracle WebCenter, to config a portlet, we need a url. What would be the url for the Spring Portlet then.
While configuring Portlet in Jboss portal server only Portlet class name is enough.
Check this to do in Oracle WebCenter Creating Java Portlets

Resources