【问题标题】:How to have auto suggest / auto complete for the spring config file?如何为 spring 配置文件自动建议/自动完成?
【发布时间】:2014-04-11 11:09:16
【问题描述】:
<?xml version="1.0" encoding="UTF-8"?>
<bean id="reservation" class="com.youtube.Reservation" init-method="init" destroy-method="destroy">
    <property name="train" ref="trainobject" />
    <property name="bus" ref="busobject" />
</bean>


<bean id="busobject" class="com.youtube.Mode">
    <property name="name" value="KPN" />
</bean>

<bean id="trainobject" class="com.youtube.Mode">
    <property name="name" value="Shatabdi" />
</bean>

我的 XML 看起来像上面那样。我需要自动建议来创建这个弹簧配置。有人可以帮忙吗?

【问题讨论】:

    标签: java xml spring configuration


    【解决方案1】:

    对于初学者来说,适当的beans 标签会很有用。

    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    

    关于这个话题请参考Spring documentation

    【讨论】:

      猜你喜欢
      • 2011-08-24
      • 2020-05-17
      • 1970-01-01
      • 2011-06-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多