码迷,mamicode.com
首页 > 其他好文 > 详细

openfire build(2)

时间:2014-05-01 08:42:11      阅读:305      评论:0      收藏:0      [点我收藏+]

标签:class   code   string   int   404   set   cti   type   管理   不同的   load   

InterceptorManager 
PluginManager

openfire 插件的中servlet 在web-custom.xml 中的配置 url 一定要小写,访问时不区别大写小 否则404
如:

  <servlet>

    <servlet-name>Sample1Servlet</servlet-name>

        <servlet-class>com.myyule.openfire.plugin.Sample1Servlet</servlet-class>

    </servlet>

    <servlet-mapping>

        <servlet-name>Sample1Servlet</servlet-name>

        <url-pattern>/servlet1</url-pattern>

  <!-- 此处一定要小写,访问时大小时无关,否则404

  http://127.0.0.1:9090/plugins/sample/ServLet1 也可以访问成功

   -->

    </servlet-mapping>



自定用户表:

--设置JDBC连接方式
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcProvider.connectionString‘,

‘jdbc:oracle:thin:@10.35.246.178:1521:orcl‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcProvider.driver‘, ‘oracle.jdbc.driver.OracleDriver‘);

--设置管理员账号
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘admin.authorizedJIDs‘, ‘admin@localhost‘);

--自定义用户认证
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcAuthProvider.useConnectionProvider‘, ‘true‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcAuthProvider.passwordSQL‘, ‘select ‘‘123456‘‘ as pwd from

t_sys_user t where t.code=?‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcAuthProvider.passwordType‘, ‘plain‘);

--自定义用户管理
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.allUsersSQL‘, ‘select code from t_sys_user

t‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.nameField‘, ‘name‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.searchSQL‘, ‘select code from t_sys_user t

where code=?‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.useConnectionProvider‘, ‘true‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.emailField‘, ‘email‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.userCountSQL‘, ‘select count(*) from

t_sys_user t‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.loadUserSQL‘, ‘select t.name,t.email,t.code

from t_sys_user t where t.code=?‘);
insert into OFPROPERTY (NAME, PROPVALUE)
values (‘jdbcUserProvider.usernameField‘, ‘code‘);

--使用不同的数据源
update OFPROPERTY set

PROPVALUE=‘org.jivesoftware.openfire.user.JDBCUserProvider‘
where NAME=‘provider.user.className‘;
update OFPROPERTY set

PROPVALUE=‘org.jivesoftware.openfire.auth.JDBCAuthProvider‘
where NAME=‘provider.auth.className‘;
commit;

 



openfire build(2),码迷,mamicode.com

openfire build(2)

标签:class   code   string   int   404   set   cti   type   管理   不同的   load   

原文地址:http://www.cnblogs.com/hujihon/p/3702486.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!