Eclipse RCP Spring integration error - java

I'm facing issue, integrating Spring in my eclipse rcp project. Basically, to avoid confusion, I've created a simple Hello RCP With a view, created a Plugin from existing jars(for spring Jars), added this project to Hello RCP with a view as a dependency, I've placed applicationContext.xml file in my src folder of the RCP project.
It always throws FileNotFoundException when I place applicationContext.xml in the src folder. As a workaround I've also tried using absolute path
ApplicationContext applicationContext = new FileSystemXmlApplicationContext("E:/applicationContext.xml");
This approach thorws ClassNotFoundException: Cannot find class with bean Name .....
for a normal Java application it works for me. How can I do that, where to place applicationContext.xml in Eclipse RCP, are there any simple tutorials for integrating spring with eclipse rcp. How to get rid of this issue and use spring in my application.

Spring DM is an option for integrating spring and osgi. expose spring beans as services in osgi.

Related

How to manually configure directory of spring boot project in Intellij?

I want to add an existing spring boot project into my Intellij collection project as a module.
Obviously if I open the spring boot project by itself, everything is configured correctly, but it's not configured correctly if I copy a spring boot project directly into the directory of the collection project where the modules go.
After I manually mark the directory as a sources root, I still need to set the classpath the way it would've been setup if importing the spring boot project directly.
What is the easiest way to finish configuring Project Structure for the directory so that it would work as if it was imported directly?
You can try to close the IDE, backup and delete all .iml files from your Spring project, open your main project in the IDE and use Import a module from existing sources to add your Spring project as a module.

How to update resources at runtime in spring boot-angular project using IntelliJ IDE

I am new to Spring boot and angular so lease bear with me if something is not clear in the question or I am asking something trivial. I downloaded a sample project for learning purposes and I am able to deploy the application
Project structure
I have a REST spring boot application with an empty webapp directory
Angular project is a separate module which is built by running ng build in the parent folder and when the project is built the angular assets are moved to webapp folder of the spring project
Then running the mvn clean install I generate the war file for the application and deploy it using simple Run Application.java
Now the problem with the project is every time I make a change in the Angular project I have to re-deploy the whole application :(
I was wondering if there is a way to hotswap resources i.e. webapp files in the deployed war when I make changes to the UI using IntelliJ IDE
I have visited the following questions on this topic and nothing has helped so far.
StackOverflow Help
JetBrains support ticket
Spring Docs

IDEA's maven webapp project settings

I want to create webapp project using IDEA IDE, but I am confused with basic web setting. I have got standart maven-webapp project archetype with web.xml in src/main/webapp, with some spring code in src/main/java; Path for web.xml I have specified in Deployment Descriptors path. But what have I to specify in Web Resource Directories and Source Roots? Project Settings=> Modules => WEB. I am new to IDEA, everything works under eclipse, but not in IDEA. By the way, I need Servlets 3.0 specification, as I want to start Spring MVC based application using Java-based configuration: by extending AbstractAnnotationConfigDispatcherServletInitializer, not mapping via xml

test folder configuration in web project

I have a spring web project in eclipse which has folder structure as
src/main/java
src/main/resources
src/test/java
src/test/resources
For some time my eclipse project used to work fine. But recently, when i start the application my eclipse project loads spring annotated beans from
src/test/java
folder.Because of this i am getting
org.springframework.beans.factory.NoUniqueBeanDefinitionException
from spring as there are two implementations of the same spring bean.
When i remove this folder from build path my application works well. Can someone please help with the reason for such behavioral change in my project?
we have two types of ioc containers in spring BeanFactory,ApplicationContext.when a request comes bean factory creates the instance which we declare a bean in xml. but application context creates all bean instances at the time of loading....

making jar the custom components in jsf with maven

I have working on a project that is same as primefaces project.(custom component in jsf) I create component class and renderer class and any thing I need to make it.
my components correctly work in my web application.
now i want to make jar it with maven .i using maven 3.0.5 and intllij IDE 13.
can you help me by saying me the steps of creation jar file from custom component in
jsf 2.1.6?
i see this Error in cmd:
thank you
Create a new Maven project or module, put your web resources (i.e. JSF views, scripts, images etc.) in src/main/resources/META-INF/resources, create a src/main/resources/META-INF/faces-config.xml and use jar, not war packaging.
Put all Java sources under src/main/java and run mvn install as usual.

Categories

Resources