我是Intellij 14.0的新手。我当时正在使用Netbeans,但我的同事告诉我转移到intellij,所以我做了。
我需要运行我在Intellij上运行netbeans的同一个项目。我正在研究的项目是用grails和spring制作的。当我尝试使用Intellij运行项目时,这就是我得到的。
弹簧配置检查 找到未映射的Spring配置文件。 请为模块配置/设置Spring facet: .........(1档)
这是文件。
的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 http://www.springframework.org/schema/beans/spring-beans.xsd">
<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>
老实说,我不知道如何解决它。根据我的理解,它正在寻找一些模块,但我无法解决它。我甚至试过这个“添加框架支持”。但我在名单中找不到弹簧。
你可以帮我解决这个问题吗?感谢答案 0 :(得分:31)
转到文件/项目结构/模块,单击绿色加号图标,从下拉列表中选择Spring,然后在下一个对话框中选择您的模块。
然后单击右窗格中的绿色加号,单击加号并选择Spring配置文件和类,然后单击“确定”。
另请参阅IntelliJ Help的Spring Facet。
答案 1 :(得分:0)
IntelliJ Ultimate 2018-手动方式:
自动方式:
答案 2 :(得分:0)
今天刚刚遇到了这个问题-我的构建昨天晚上工作了,今天早上它停止了工作-所以我想我可以使用 IntelliJIDE CE 2019.1 发布我的解决方案。 / p>
错误消息(以帮助人们找到此答案)
package org.springframework.transaction.annotation does not exist
package org.springframework.boot does not exist
Unknown facet type: 'Spring'
Unknown facet type: 'web'
步骤0 : 更新IntelliJ
Menu: IntelliJIDE > Check for Updates (Mac OSX)
第1步: 清除Maven存储库并重新下载依赖项,以确保源没有损坏。这将需要5分钟以上的时间。
$ cd [project_directory]
$ mvn dependency:purge-local-repository
第2步: 执行全新安装。
$ mvn clean install
第3步: 更新IntelliJIDE的存储库索引:
相关问题