Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 453 Vote(s) - 3.46 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to configure Spring facet in IntelliJ IDEA

#1
I'm new to Intellij 14.0 . I was using Netbeans, but my colleagues told me to shift to intellij and so I did.


I need to run the same project that I ran on netbeans in Intellij. The project that I'm working on is made of grails and spring. When I tried to run the project using Intellij this is what I get.

> Spring Configuration Check
> Unmapped Spring configuration files found.
> Please configure/setup Spring facet for modules:
> ......... (1 file)

And this is the file.

applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans

[To see links please register here]

;

<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
<description>Grails application factory bean</description>
<property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
<property name="grailsResourceLoader" ref="grailsResourceLoader" />
</bean>

<bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
<description>A bean that manages Grails plugins</description>
<property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
<property name="application" ref="grailsApplication" />
</bean>

<bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
<constructor-arg>
<ref bean="grailsApplication" />
</constructor-arg>
<property name="pluginManager" ref="pluginManager" />
</bean>

<bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean" />

<bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
<property name="encoding">
<value>utf-8</value>
</property>
</bean>

<bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
</beans>

Honestly, I dont have any idea how to fix it. Based on my understanding it is looking for some modules but I could not fix it. I even tried this "Add framework support" . But I couldn't find spring in the list.

Could you help me fix this? Thanks
Reply

#2
Go to _File/Project Structure/Modules_, click the green plus icon, select Spring from the dropdown and select your module in the next dialog.

Then click the green plus in the right pane, click plus and select your Spring configuration files and classes and click OK.

Also take a look at [IntelliJ Help](

[To see links please register here]

) for Spring Facet.
Reply

#3
IntelliJ Ultimate 2018 - the manual way:

1. Menu File -> Project Structure
2. Right-click on your module and choose "Add..." -> Spring
3. Optionally click "fix" if spring is not listed as a dependency
4. Click the + icon at the top to add your spring configuration .xml file(s)

[![enter image description here][1]][1]

The automatic way:

1. Click the body of the popup notification
2. Click the "Create Default" option

[![enter image description here][2]][2]


[1]:

[2]:
Reply

#4
Just ran into this issue out of the blue today—my build was working last night, and this morning it stopped working—so I figured I'd post my solution using **IntelliJIDE CE 2019.1**.

**Error Messages** (to help people find this answer)
```
package org.springframework.transaction.annotation does not exist
package org.springframework.boot does not exist
Unknown facet type: 'Spring'
Unknown facet type: 'web'
```
[![enter image description here][1]][1]

----------
## Solution ##

**Step 0**:
Update IntelliJ
```
Menu: IntelliJIDE > Check for Updates (Mac OSX)
```

**Step 1**:
Clean out Maven repo and re-download dependencies to ensure that the sources are not corrupt. This will take 5+min.
```
$ cd [project_directory]
$ mvn dependency:purge-local-repository
```

**Step 2**:
Preform a clean install.
```
$ mvn clean install
```

**Step 3**:
Update IntelliJIDE's Repository Indexes:

1. Open IntelliJ Settings/Preferences
2. Build, Execution, Deployment > Build Tools > Maven > Repositories
3. Select repositories one by one (by clicking on the table row) and click the update button. Specifically, do it for **https://repo.mave.apache.org/maven2**. The download is ±700mb so it will take a while. (10+min)
[![enter image description here][2]][2]


----------
**Related Questions**

-

[To see links please register here]

-

[To see links please register here]


[1]:

[2]:
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through