SpringMVC和Freemarker整合,带自定义标签的使用方法。

【参考来源:http://www.360doc.com/content/14/1225/14/1007797_435663342.shtml】

SpringMVC现在是比较热门的一种框架了,使用起来感觉还是很不错的,现在我分享一下集体的配置和使用,希望对学习SpringMVC的朋友有用。
一、首先我们做准备工作,下载Spring包,下载Freemarker包。
二、配置web.xml。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:/applicationContext*.xml</param-value>
    </context-param>
    <filter>
        <filter-name>encoding</filter-name>
        <filter-class>
            org.springframework.web.filter.CharacterEncodingFilter
        </filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>
    <!-- Spring 的servlet -->
    <servlet>
        <servlet-name>spring</servlet-name>
        <servlet-class>
            org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:spring-servlet.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>spring</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
 
    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>*.jpg</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>*.png</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>*.js</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>*.css</url-pattern>
    </servlet-mapping>
 
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <error-page>
        <error-code>404</error-code>
        <location>/404.jsp</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/500.jsp</location>
    </error-page>

三、接下来配置applicationContext.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:cache="http://www.springframework.org/schema/cache"
    xsi:schemaLocation="  
           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd  
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd  
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
           http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
           "
    default-lazy-init="true">
 
    <description>Spring数据库及事务配置</description>
     
    <context:component-scan base-package="com.mynote.*,com.base.*">
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
    </context:component-scan>
     
    <context:property-placeholder
        location="classpath:/jdbc.properties" />
         
    <!-- 数据库连接 -->
    <bean id="dataSource"
        class="org.logicalcobwebs.proxool.ProxoolDataSource">
        <property name="alias">
            <value>proxoolds</value>
        </property>
        <property name="driver">
            <value>${datasource.driverClassName}</value>
        </property>
        <property name="driverUrl">
            <value>${datasource.url}</value>
        </property>
        <property name="user">
            <value>${datasource.username}</value>
        </property>
        <property name="password">
            <value>${datasource.password}</value>
        </property>
        <property name="houseKeepingSleepTime">
            <value>${datasource.houseKeepingSleepTime}</value>
        </property>
        <property name="maximumConnectionCount">
            <value>${datasource.maximumConnectionCount}</value>
        </property>
        <property name="minimumConnectionCount">
            <value>${datasource.minimumConnectionCount}</value>
        </property>
        <property name="prototypeCount">
            <value>${datasource.prototypeCount}</value>
        </property>
        <property name="maximumActiveTime" value="1800000"/> 
        <property name="simultaneousBuildThrottle" value="100"/>
    </bean>
     
    <bean id="jdbcTemplate"
        class="org.springframework.jdbc.core.JdbcTemplate">
        <property name="dataSource" ref="dataSource" />
    </bean>
     
    <bean id="simpleJdbcInsert"
        class="org.springframework.jdbc.core.simple.SimpleJdbcInsert">
        <constructor-arg ref="dataSource"/>
    </bean>
     
    <!-- 事务管理 -->
    <bean id="transactionManager"
        class="org.springframework.jdbc.datasource.DataSourceTransactionManager">  
        <property name="dataSource" ref="dataSource" />  
    </bean>
     
    <tx:annotation-driven transaction-manager="transactionManager" />
     
    <bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
        <property name="shared" value="true"/>
    </bean>
    <bean id="ehcache" factory-bean="ehCacheManager" factory-method="getEhcache">
        <constructor-arg value=""/>
    </bean>
 
    <cache:annotation-driven cache-manager="springEhCacheManager" />
     
    <bean id="springEhCacheManager" class="com.base.modules.utils.AutoCreatedEhCacheCacheManager">
        <property name="cacheManager" ref="ehCacheManager"/>
    </bean>
     
    <!-- 定期执行的业务类 
    <bean id="jdkExecutorJob" class="com.shst.base.bdss.bdssTask" lazy-init="false">
        <property name="period" value="180" />
        <property name="initialDelay" value="10" />
        <property name="shutdownTimeout" value="120" />
    </bean>
    -->
</beans>

四、接下来写spring-servlet.xml配置好jsp和Freemarker的自动切换,只要你的请求指定了跳转,那么就会先找对应的Freemarker文件然后会找jsp页面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
 
    <mvc:annotation-driven />
    <!-- 将无法mapping到Controller的path交给default servlet handler处理 -->
    <mvc:default-servlet-handler />
 
    <context:component-scan base-package="com.mynote.*"
        use-default-filters="false">
        <context:include-filter type="annotation"
            expression="org.springframework.stereotype.Controller" />
        <!-- 
            shiro方法拦截需求
            <context:include-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice" />
        -->
    </context:component-scan>
 
    <mvc:interceptors>
        <!-- 多个拦截器,顺序执行 -->
        <mvc:interceptor>
            <mvc:mapping path="/**" /><!-- 如果不配置或/*,将拦截所有的Controller -->
            <bean class="com.base.modules.intercepter.SecurityIntercepter"></bean>
        </mvc:interceptor>
    </mvc:interceptors>
 
    <bean
        class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"
        p:prefix="/" p:suffix=".ftl">
        <property name="cache" value="false" />
        <property name="viewClass"
            value="org.springframework.web.servlet.view.freemarker.FreeMarkerView" />
        <property name="contentType" value="text/html;charset=UTF-8"></property>
        <property name="exposeRequestAttributes" value="true" />
        <property name="exposeSessionAttributes" value="true" />
        <property name="exposeSpringMacroHelpers" value="true" />
        <property name="requestContextAttribute" value="base"></property>
        <property name="order" value="0"></property>
    </bean>
 
    <bean id="multipartResolver"
        class="org.springframework.web.multipart.commons.CommonsMultipartResolver"
        p:defaultEncoding="UTF-8" />
 
    <bean id="IndexContentListTag"
        class="com.mynote.tag.IndexContentListTag">
    </bean>
    <bean id="BKIndexContentListTag"
        class="com.mynote.tag.BKIndexContentListTag">
    </bean>
    <bean id="contentTag" class="com.mynote.tag.ContentTag"></bean>
    <bean id="HotBlogContentTag"
        class="com.mynote.tag.HotBlogContentTag">
    </bean>
    <bean id="freemarkerConfig"
        class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
        <property name="templateLoaderPath" value="/templates/" />
        <property name="defaultEncoding" value="UTF-8" />
        <property name="freemarkerVariables">
            <map>
                <entry key="indexContent"
                    value-ref="IndexContentListTag">
                </entry>
                <entry key="bkContent"
                    value-ref="BKIndexContentListTag">
                </entry>
                <entry key="blogContent" value-ref="contentTag"></entry>
                <entry key="hotContent" value-ref="HotBlogContentTag"></entry>
            </map>
        </property>
        <property name="freemarkerSettings">
            <props>
                <prop key="tag_syntax">auto_detect</prop>
                <prop key="template_update_delay">5</prop>
                <prop key="defaultEncoding">UTF-8</prop>
                <prop key="url_escaping_charset">UTF-8</prop>
                <prop key="locale">zh_CN</prop>
                <prop key="boolean_format">true,false</prop>
                <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>
                <prop key="date_format">yyyy-MM-dd</prop>
                <prop key="time_format">HH:mm:ss</prop>
                <prop key="number_format">0.######</prop>
                <prop key="whitespace_stripping">true</prop>
                <!--空值处理<prop key="classic_compatible">true</prop>-->
                <!--  <prop key="auto_import">/ftl/tags/index.ftl as p,/ftl/spring.ftl as s</prop>-->
            </props>
        </property>
    </bean>
 
    <bean
        class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
 
    <bean id="viewResolverCommon"
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass"
            value="org.springframework.web.servlet.view.JstlView" />
        <property name="order" value="1"></property>
        <property name="prefix" value="/WEB-INF/" />
        <property name="suffix" value=".jsp"></property>
    </bean>
 
    <bean
        class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
        <property name="messageConverters">
            <list>
 
                <!-- 解析json请求数据,将json转换为java对象-->
                <bean
                    class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" />
                <!-- 解析xml请求数据,将xml转换为java对象-->
 
                <bean
                    class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
                    <constructor-arg>
                        <bean
                            class="org.springframework.oxm.xstream.XStreamMarshaller">
                            <property name="streamDriver">
                                <bean
                                    class="com.thoughtworks.xstream.io.xml.DomDriver" />
                            </property>
 
                            <property name="autodetectAnnotations">
                                <value>true</value>
                            </property>
                            <!--可以与xml互换的对象,需要使用XStream的注解,注解的使用方法请参XStream官网-->
                            <!-- 
                                <property name="annotatedClasses">
                                <list>
                                <value>com.xxx.XxxxDTO</value>
                                </list>
                                </property>
                            -->
                        </bean>
                    </constructor-arg>
                </bean>
                <bean
                    class="org.springframework.http.converter.FormHttpMessageConverter" />
                <bean
                    class="org.springframework.http.converter.BufferedImageHttpMessageConverter" />
                <bean
                    class="org.springframework.http.converter.ByteArrayHttpMessageConverter" />
                <bean
                    class="org.springframework.http.converter.StringHttpMessageConverter" />
                <!-- 
                    <bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
                -->
                <!--可以增加其他数据类型,请参考spring的API-->
            </list>
        </property>
    </bean>
    <bean id="fmXmlEscape"
        class="freemarker.template.utility.XmlEscape" />
    <bean
        class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
        <property name="ignoreAcceptHeader" value="true" />
        <property name="defaultContentType" value="text/html" />
 
        <!-- 扩展名至mimeType的映射,即 /user.json => application/json -->
        <property name="mediaTypes">
            <map>
                <entry key="html" value="text/html" />
                <entry key="json" value="application/json" />
                <entry key="xml" value="application/xml" />
            </map>
        </property>
        <!-- 用于开启 /userinfo/123?format=json 的支持 -->
        <property name="favorParameter" value="false" />
 
        <property name="viewResolvers">
            <list>
                <bean
                    class="org.springframework.web.servlet.view.BeanNameViewResolver" />
            </list>
        </property>
        <property name="defaultViews">
            <list>
                <!-- for application/json -->
                <bean
                    class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" />
                <!-- for application/xml -->
                <bean
                    class="org.springframework.web.servlet.view.xml.MarshallingView">
                    <property name="marshaller">
                        <bean
                            class="org.springframework.oxm.xstream.XStreamMarshaller" />
                    </property>
                </bean>
            </list>
        </property>
    </bean>
 
    <bean id="localeResolver"
        class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
        <property name="cookieName" value="clientlanguage" />
        <property name="cookieMaxAge" value="-1" />
    </bean>
    <!--
        <bean
        class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
        depends-on="lifecycleBeanPostProcessor">
        <property name="proxyTargetClass" value="true" />
        </bean>
         
        <bean
        class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
        <property name="securityManager" ref="securityManager"></property>
        </bean>
    -->
    <bean
        class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
        <property name="exceptionMappings">
            <props>
                <prop key="java.lang.Throwable">500</prop>
            </props>
        </property>
        <property name="warnLogCategory" value="WARN"></property>
        <property name="defaultErrorView" value="500"></property>
        <property name="defaultStatusCode" value="500"></property>
        <property name="statusCodes">
            <props>
                <prop key="404">404</prop>
                <prop key="500">500</prop>
            </props>
        </property>
 
    </bean>
 
</beans>

五、接下来就开始写java类了,我们将使用注解来实现功能

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@Controller
@RequestMapping
public class ContentController {
 
    @Autowired
    private TemplatesService templatesService;
    @Autowired
    private BlogContentService contentService;
    @Autowired
    private BlogInfoService blogInfoService;
     
    @RequestMapping("{username}/{contentId}.html")
    public String content(HttpServletRequest request, @PathVariable
    String username, @PathVariable
    String contentId) {
        // 获得模版路径执行跳转
        String path=templatesService.getTemplatesPath(username);
        BlogInfo info = blogInfoService.findBlogInfoByUserName(username);
        if(info==null){
            info = new BlogInfo();
            info.setName("OSblog");
            info.setDes("我的博客我做主");
            info.setNickname("Osblog博客");
        }
        request.setAttribute("bloginfo", info);
        contentService.updateclicks(contentId);
        request.setAttribute("bloguser", username);
        BlogContent content=contentService.getEntityById(contentId);
        request.setAttribute("content", content);
        return path+"/content";
    }
}

这是一个控制器,和Struts中Action是一样的,上面的方法是动态接受请求的方法,比如请求是http://localhost:8080/osblog/12.html,在控制器中取到的username=osblog,contentid=12,是不是很智能啊。
剩下的数据层和业务层写法就没有什么可写的了,注解的方式也和普通注解一样。在配置文件中写到了:

1
2
3
4
5
6
7
8
9
10
11
12
13
<bean
        class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"
        p:prefix="/" p:suffix=".ftl">
        <property name="cache" value="false" />
        <property name="viewClass"
            value="org.springframework.web.servlet.view.freemarker.FreeMarkerView" />
        <property name="contentType" value="text/html;charset=UTF-8"></property>
        <property name="exposeRequestAttributes" value="true" />
        <property name="exposeSessionAttributes" value="true" />
        <property name="exposeSpringMacroHelpers" value="true" />
        <property name="requestContextAttribute" value="base"></property>
        <property name="order" value="0"></property>
    </bean>

这个就是指明了你调转的视图是Freemarker的,同理另一个指明的是jsp按照顺序他们会自动选这你要跳转的视图。不过在注解是@RequestMapping("sitemap.html")里面的值绝对不能重复的。

SpringMVC和Freemarker整合,带自定义标签的使用方法的更多相关文章

  1. springMVC与freemarker整合

    准备好的环境:Maven工程整合好了ssm,即spring+springMVC+mybatis.接下来准备将springMVC与freemarker整合,以html文件为模板. 一,加入freemar ...

  2. html 自定义标签使用实现方法

    通过指定html命名空间的名字来定义自定义标签:默认的一些标签p div等都在html默认的命名空间下.而自定义的标签可以放在自定义的命名空间下,可通过xmlns:命名空间名 来指定,而自定义标签需要 ...

  3. springmvc结合freemarker,非自定义标签

    参考:http://viralpatel.net/blogs/spring-mvc-freemarker-ftl-example/ 上图: 目录层级: 启动后的访问地址:http://localhos ...

  4. OneBlog开源博客-详细介绍如何实现freemarker自定义标签

    前言 OneBlog中使用到了springboot + freemarker的技术,同时项目里多个controller中都需要查询一个公有的数据集合,一般做法是直接在每个controller的方法中通 ...

  5. JSP进阶 之 SimpleTagSupport 开发自定义标签

    绝大部分 Java 领域的 MVC 框架,例如 Struts.Spring MVC.JSF 等,主要由两部分组成:控制器组件和视图组件.其中视图组件主要由大量功能丰富的标签库充当.对于大部分开发者而言 ...

  6. 一、JSP标签介绍,自定义标签

    一.JSP标签介绍 1. 标签库有什么作用 自定义标签库是一种优秀的表现层技术,之前介绍的MVC模式,我们使用jsp作为表现层,但是jsp语法嵌套在html页面,美工还是很难直接参与开发,并且jsp脚 ...

  7. Spring 系列教程之自定义标签的解析

    Spring 系列教程之自定义标签的解析 在之前的章节中,我们提到了在 Spring 中存在默认标签与自定义标签两种,而在上一章节中我们分析了 Spring 中对默认标签的解析过程,相信大家一定已经有 ...

  8. Java_JSP自定义标签的开发与应用

    在JSTL提供了四个标签库(核心标签库.国际化标签库.数据库标签库和XML标签库),涉及到了几十个标签.虽然这些标签可以完成比较复杂的工作,但它们仍然无法满足程序中的特殊需求.因此,就需要用户根据自己 ...

  9. Servlet和JSP之自定义标签学习

      此文章会讲述简单标签处理器,因为经典自定义标签处理器没有简单标签处理器方便使用,故在此不进行描述. 参考:慕课网的<JSP自定义标签>视频; <Servlet.JSP和Sprin ...

随机推荐

  1. jQuery编程规范与最佳实践(附带一些个人的笔记)

    加载jQuery-Loading jQuery 1.坚持使用CDN来加载jQuery,这种别人服务器免费帮你托管文件的便宜干嘛不占呢.点击查看使用CDN的好处,点此查看一些主流的jQuery CDN地 ...

  2. UVa 11324 最大团(强连通分量缩点)

    https://vjudge.net/problem/UVA-11324 题意:给一张有向图G,求一个结点数最大的结点集,使得该结点集中任意两个结点u和v满足,要么u可以到达v,要么v可以达到u. 思 ...

  3. tp5.1升级

    # php think version v5.1.23 # composer update Loading composer repositories with package information ...

  4. Moment.js的一些用法

    前记:项目开发用到了日历插件(Pikaday.js),同时也用到了Moment.js(日期处理类库) 1.subtract:减去,下面代码的意思是减去1天 this.yestdayStr = mome ...

  5. javaScript实现点击按钮直接打印

    很多网站都有此功能,当浏览到底部时都会有一个打印按钮,点击打印按钮就可以完成打印功能,功能非常不错,人性化,代码非常的简单. 一.只要调用window.print()函数就可以实现打印当前页面 < ...

  6. [Vue]实例化Vue时的两种挂载方式el与$mount

    Vue 的$mount()为手动挂载,在项目中可用于延时挂载(例如在挂载之前要进行一些其他操作.判断等),之后要手动挂载上.new Vue时,el和$mount并没有本质上的不同. 1.el Vue实 ...

  7. delphi ScriptGate 调用JS

    在 FireMonkey 使用 TWebBrowser 调用 Javascript函数并获取返回值以及 JavaScript 中调 Delphi 的函数/过程,普遍都在使用老掉牙的URL重定的方法,还 ...

  8. Codeforces Round #423

    这一次又崩了,最后只a了一题(还是被hack后才发现的错误) 第一题水题,多用一个数保存2-1后的数,注意先用2的桌子,再用这个 #include<map> #include<set ...

  9. tarball安装GnuPG (gpg) 2.2.10

    https://www.gnupg.org/download/ mac 方式一:推荐 mac $ brew install gpg pinentry pinentry-mac $ echo " ...

  10. SOUI中启用拖文件

    本文所用SOUI版本为1.0版本,在拖文件上与一般的消息略有不同. 1.添加拖文件消息响应 先与常规添加消息相同. class CMainFrm : public SHostWnd { public: ...