Apache James配置连接达梦数据库

项目场景:

Apache James配置连接达梦数据库,其他配置中不存在的数据库也可参考此方案。


配置步骤

1、把需要的jar包导入到James

把DmJdbcDriver18.jar复制到下面lib目录下

james-2.3.2\lib

2、 修改连接配置

james-2.3.2\apps\james\SAR-INF\config.xml

<users-store><repository name="LocalUsers" class="org.apache.james.userrepository.JamesUsersJdbcRepository" destinationURL="db://maildb/mail_users"><sqlFile>file://conf/sqlResources.xml</sqlFile></repository>
</users-store><database-connections><data-source name="maildb" class="org.apache.james.util.dbcp.JdbcDataSource"><driver>dm.jdbc.driver.DmDriver</driver><dburl>jdbc:dm://172.0.0.1:5236/test</dburl><user>test</user><password>test_200</password><max>50</max></data-source>
</database-connections>

3、 修改sql语句

james-2.3.2\apps\james\conf\sqlResources.xml

<!-- Licensed to the Apache Software Foundation (ASF) under one   or more contributor license agreements.  See the NOTICE file distributed with this work for additional information        regarding copyright ownership.  The ASF licenses this file   to you under the Apache License, Version 2.0 (the            "License"); you may not use this file except in compliance   with the License.  You may obtain a copy of the License at   http://www.apache.org/licenses/LICENSE-2.0                 Unless required by applicable law or agreed to in writing,   software distributed under the License is distributed on an  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       KIND, either express or implied.  See the License for the    specific language governing permissions and limitations      under the License.  
-->
<!--Licensed to the Apache Software Foundation (ASF) under one   or more contributor license agreements.  See the NOTICE file distributed with this work for additional information        regarding copyright ownership.  The ASF licenses this file   to you under the Apache License, Version 2.0 (the            "License"); you may not use this file except in compliance   with the License.  You may obtain a copy of the License at   http://www.apache.org/licenses/LICENSE-2.0                 Unless required by applicable law or agreed to in writing,   software distributed under the License is distributed on an  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       KIND, either express or implied.  See the License for the    specific language governing permissions and limitations      under the License.                                           -->
<!-- SQL Statements used by James for database access. -->
<sqlResources><!--This section provided configuration to determine the determine thedatabase product which is being used for storage. Different databaseproducts may require different SQL syntax.The jdbc database connection is examined to see if it matches with theregular expressions specified in any of the defined matchers. The matchersare processed in the over provided here, with the first successful matchdefining the "db" value for this connection.This value is then used to choose between different definitions for variousnamed sql statements, defined below. If no match is found,the default sql statements are used.
-->
<dbMatchers><dbMatcher db="mssql" databaseProductName="microsoft sql server"/><dbMatcher db="oracle" databaseProductName="oracle.*"/><dbMatcher db="dm" databaseProductName="dm.*"/><dbMatcher db="mysql" databaseProductName="my.*"/><dbMatcher db="derby" databaseProductName="derby.*"/><dbMatcher db="postgresql" databaseProductName="postgres.*"/><dbMatcher db="hsqldb" databaseProductName="hsql.*"/><dbMatcher db="sapdb" databaseProductName="sap.*"/><dbMatcher db="hypersonic" databaseProductName="HypersonicSQL"/><dbMatcher db="db2" databaseProductName="db2.*"/><dbMatcher db="ingres" databaseProductName="ingres.*"/>
</dbMatchers><!--With the following section it is possible to associate several name/value pairsof options to a database product, identified by the "db" XML attribute name.An element without a "db" attribute, if used for an option name, will become a default value for such option.Each option may have a "default default", i.e. a default that applies if no element with an empty"db" attribute (default element) exists as said above;such default default must be documented for such option below.The order of the XML elements is meaningless.Here only "getBody" and "getAttributes" option names are set, but others could be used in the future.Option names:"getBody" - a string (case insensitive) telling which JDBC ResultSet method will be used toget the message body field for a database product.The default default value is "useBytes"..Values (case insensitive):"useBytes"  - use getBytes(int)."useBlob"   - use getBlob(int)."getAttributes" - a string (case insensitive) telling which JDBC ResultSet method will be used toget the message attributes field for a database product.The default default value is "useBytes"..Values (case insensitive):"useBytes"  - use getBytes(int)."useBlob"   - use getBlob(int).
-->
<dbOptions><dbOption name="getBody" value="useBytes"/><dbOption name="getAttributes" value="useBytes"/><dbOption db="mssql" name="getBody" value="useBytes"/><dbOption db="mssql" name="getAttributes" value="useBytes"/><dbOption db="oracle" name="getBody" value="useBlob"/><dbOption db="oracle" name="getAttributes" value="useBlob"/><dbOption db="dm" name="getBody" value="useBlob"/><dbOption db="dm" name="getAttributes" value="useBlob"/><dbOption db="mysql" name="getBody" value="useBytes"/><dbOption db="mysql" name="getAttributes" value="useBytes"/><dbOption db="derby" name="getBody" value="useBytes"/><dbOption db="derby" name="getAttributes" value="useBytes"/><dbOption db="postgresql" name="getBody" value="useBytes"/><dbOption db="postgresql" name="getAttributes" value="useBytes"/><dbOption db="sapdb" name="getBody" value="useBytes"/><dbOption db="sapdb" name="getAttributes" value="useBytes"/><dbOption db="hypersonic" name="getBody" value="useBytes"/><dbOption db="hypersonic" name="getAttributes" value="useBytes"/><dbOption db="hsqldb" name="getBody" value="useBytes"/><dbOption db="hsqldb" name="getAttributes" value="useBytes"/><dbOption db="db2" name="getBody" value="useBlob"/><dbOption db="db2" name="getAttributes" value="useBlob"/><dbOption db="ingres" name="getBody" value="useBytes"/><dbOption db="ingres" name="getAttributes" value="useBytes"/>
</dbOptions><!-- SQL statements to use for various components. -->
<!-- -->
<!-- Parameter definitions ${param} are replaced with parameter values -->
<!-- read from the configuration file. -->
<!-- -->
<!-- If a named statement has a definition defined for the current database product, -->
<!-- then that statement is used. Otherwise the default statement is used. --><!-- SQL statements for the JamesUsersJdbcRepository -->
<!-- -->
<!-- The JamesUsersJdbcRepository allows James to use a JDBC compliant database -->
<!-- to hold user related data.  This includes aliases, forward addresses, -->
<!-- and password data.  The last is stored as an irreversible hash. -->
<sqlDefs name="org.apache.james.userrepository.JamesUsersJdbcRepository"><sql name="tableName">${table}</sql><!-- Statements used to retrieve all user information for a user from this repository. --><sql name="select">SELECT username, pwdHash, pwdAlgorithm, useForwarding,forwardDestination, useAlias, aliasFROM ${table}ORDER BY username</sql><!-- Statements used to get all user information for a user with a particular user name in a --><!-- case-insensitive fashion from this repository. --><sql name="selectByLowercaseName">SELECT username, pwdHash, pwdAlgorithm, useForwarding,forwardDestination, useAlias, aliasFROM ${table}WHERE lower(username) = ?</sql><sql name="selectByLowercaseName" db="mysql">SELECT username, pwdHash, pwdAlgorithm, useForwarding,forwardDestination, useAlias, aliasFROM ${table}WHERE username = ?</sql><!-- Statements used to insert a user into this repository. --><sql name="insert">INSERT INTO ${table}(username, pwdHash, pwdAlgorithm, useForwarding, forwardDestination, useAlias, alias)VALUES (?,?,?,?,?,?,?)</sql><!-- Statements used to update information for a user from this repository. --><sql name="update">UPDATE ${table} SETpwdHash = ?, pwdAlgorithm = ?, useForwarding = ?, forwardDestination = ?, useAlias = ?, alias = ?WHERE username = ?</sql><!-- Statements used to delete a user from this repository. --><sql name="delete">DELETE FROM ${table} WHERE username = ?</sql><!-- Statements used to create the table associated with this class. --><sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding INTEGER, forwardDestination VARCHAR(255), useAlias INTEGER, alias VARCHAR(255), PRIMARY KEY(username))</sql><!-- <sql name="createTable">CREATE TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding SMALLINT, forwardDestination VARCHAR(255), useAlias SMALLINT, alias VARCHAR(255), PRIMARY KEY(username))</sql> --><sql name="createTable">select 1 from dual</sql><!-- An example of a database-specific sql statement<sql name="createTable" db="mssql">CREATE TABLE ${table} (uniqueId UNIQUEIDENTIFIER, username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding SMALLINT, forwardDestination VARCHAR(255), useAlias SMALLINT, alias VARCHAR(255), PRIMARY KEY(username))</sql>-->
</sqlDefs><!-- SQL statements for the DefaultUsersJdbcRepository -->
<!-- -->
<!-- The DefaultUsersJdbcRepository allows James to use a JDBC compliant database -->
<!-- to hold user ids and password data. The password is stored as an irreversible hash. -->
<!-- Unlike the JamesUsersJdbcRepository, this repository implementation doesn't support -->
<!-- aliases or forwards. -->
<sqlDefs name="org.apache.james.userrepository.DefaultUsersJdbcRepository"><sql name="tableName">${table}</sql><!-- Statements used to retrieve all user information for a user from this repository. --><sql name="select">SELECT username, pwdHash, pwdAlgorithmFROM ${table}</sql><!-- Statements used to insert a user into this repository. --><sql name="insert">INSERT INTO ${table}(username, pwdHash, pwdAlgorithm)VALUES (?,?,?)</sql><!-- Statements used to update information for a user from this repository. --><sql name="update">UPDATE ${table} SETpwdHash = ?, pwdAlgorithm = ?WHERE username = ?</sql><!-- Statements used to delete a user from this repository. --><sql name="delete">DELETE FROM ${table} WHERE username = ?</sql><!-- Statements used to create the table associated with this class. --><sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), PRIMARY KEY(username))</sql><sql name="createTable">CREATE TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), PRIMARY KEY(username))</sql>
</sqlDefs><!-- SQL statements for the ListUsersJdbcRepository -->
<!-- -->
<!-- This class is used for basic list management.  The database table can -->
<!-- be used to store subscriber data for mulitple lists.  -->
<sqlDefs name="org.apache.james.userrepository.ListUsersJdbcRepository"><!-- An example of defining "default" parameters within the definition file.This is used if no key parameter is specified in config. --><parameters key="unknownList"/><sql name="tableName">${table}</sql><!-- Statements used to retrieve all users on a particular list from this repository. --><sql name="select">SELECT listSubscriberFROM ${table}WHERE listName = '${key}'</sql><!-- Statements used to insert a user/list mapping into this repository. --><sql name="insert">INSERT INTO ${table}(listSubscriber, listName)VALUES (?, '${key}')</sql><!-- Statements used to update a user/list mapping in this repository. --><sql name="update">UPDATE ${table} SETlistSubscriber = ?WHERE listSubscriber = ? AND listName = '${key}'</sql><!-- Statements used to delete a user/list mapping from this repository. --><sql name="delete">DELETE FROM ${table}WHERE listSubscriber = ? AND listName = '${key}'</sql><!-- Statements used to create the table associated with this class. --><sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (listName VARCHAR(64) NOT NULL, listSubscriber VARCHAR(255) NOT NULL, PRIMARY KEY(listName, listSubscriber))</sql><sql name="createTable">CREATE TABLE ${table} (listName VARCHAR(64) NOT NULL, listSubscriber VARCHAR(255) NOT NULL, PRIMARY KEY(listName, listSubscriber))</sql>
</sqlDefs><!-- SQL statements for the JdbcMailRepository  -->
<sqlDefs name="org.apache.james.mailrepository.JDBCMailRepository"><!-- Statements used to check whether a particular message exists in this repository. --><sql name="checkMessageExistsSQL">SELECT count(*) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to update a message stored in this repository. --><sql name="updateMessageSQL">UPDATE ${table} SET message_state = ?, error_message = ?, sender = ?, recipients = ?, remote_host = ?, remote_addr = ?, last_updated = ? WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to update the body of a message stored in this repository. --><sql name="updateMessageBodySQL">UPDATE ${table} SET message_body = ? WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to update the attributes of a message stored in this repository. --><sql name="updateMessageAttributesSQL">UPDATE ${table} SET message_attributes = ? WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to insert a message into this repository. --><sql name="insertMessageSQL">INSERT INTO ${table} (message_name,repository_name, message_state, error_message, sender, recipients,remote_host, remote_addr, last_updated, message_body,message_attributes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)</sql><!-- Statements used to retrieve a message stored in this repository. --><sql name="retrieveMessageSQL">SELECT message_state, error_message, sender, recipients, remote_host, remote_addr, last_updated FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to retrieve the body of a message stored in this repository. --><sql name="retrieveMessageBodySQL">SELECT message_body FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to retrieve the attributes of a message stored in this repository. --><sql name="retrieveMessageAttributesSQL">SELECT message_attributes FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to retrieve the size of the body of a message stored in this repository. --><!-- NOTE: This statement is optional and need not be implemented for a particular database to be supported. --><sql name="retrieveMessageBodySizeSQL" db="mssql">SELECT datalength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="mysql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="hypersonic">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="hsqldb">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="postgresql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="oracle">SELECT dbms_lob.getlength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="dm">SELECT dbms_lob.getlength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="db2">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="ingres">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="derby">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to delete a message stored in this repository. --><sql name="removeMessageSQL">DELETE FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to list all messages stored in this repository. --><sql name="listMessagesSQL">SELECT message_name, message_state, last_updated FROM ${table} WHERE repository_name = ? ORDER BY last_updated ASC</sql><!-- Statements used to create the table associated with this class. --><sql name="createTable" db="mysql">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (100) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients text NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body longblob NOT NULL ,message_attributes longblob NULL ,last_updated datetime NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients varchar NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body varchar NOT NULL ,message_attributes varchar NULL ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="hsqldb">CREATE CACHED TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients varchar NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body varchar NOT NULL ,message_attributes varchar NULL ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="mssql">CREATE TABLE [${table}] ([message_name] [varchar] (200) NOT NULL,[repository_name] [varchar] (255) NOT NULL,[message_state] [varchar] (30) NOT NULL ,[error_message] [varchar] (1000) NULL ,[sender] [varchar] (255) NULL ,[recipients] [text] NOT NULL ,[remote_host] [varchar] (255) NOT NULL ,[remote_addr] [varchar] (20) NOT NULL ,[message_body] [image] NOT NULL ,[message_attributes] [image] NULL ,[last_updated] [datetime] NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="oracle">CREATE TABLE ${table} (message_name varchar2(200) NOT NULL ,repository_name varchar2(255) NOT NULL ,message_state varchar2(30) NOT NULL ,error_message varchar2(200) NULL ,sender varchar2(255) ,recipients varchar2(1000) NOT NULL ,remote_host varchar2(100) NOT NULL ,remote_addr varchar2(20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob NULL ,last_updated date NOT NULL ,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="dm">CREATE TABLE ${table} (message_name varchar2(200) NOT NULL ,repository_name varchar2(255) NOT NULL ,message_state varchar2(30) NOT NULL ,error_message varchar2(200) NULL ,sender varchar2(255) ,recipients varchar2(1000) NOT NULL ,remote_host varchar2(100) NOT NULL ,remote_addr varchar2(20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob NULL ,last_updated date NOT NULL ,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="postgresql">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients text NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body bytea NOT NULL ,message_attributes bytea NULL ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="sapdb">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (200) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (200) NULL ,recipients long NOT NULL ,remote_host varchar (100) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body long byte NOT NULL ,message_attributes long byte NULL ,last_updated date NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="db2">CREATE TABLE ${table} (message_name varchar(200) NOT NULL ,repository_name varchar(255) NOT NULL ,message_state varchar(30) NOT NULL ,error_message varchar(200) ,sender varchar(255) ,recipients varchar(1000) NOT NULL ,remote_host varchar(100) NOT NULL ,remote_addr varchar(20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob ,last_updated timestamp NOT NULL ,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="ingres">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) ,sender varchar (255) ,recipients LONG VARCHAR NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body LONG BYTE NOT NULL ,message_attributes LONG BYTE ,last_updated DATE NOT NULL)</sql><sql name="createTable" db="derby">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) ,sender varchar (255) ,recipients long varchar NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql>
</sqlDefs><!-- SQL statements to support the JDBCSpoolRepository class -->
<!-- -->
<!-- The JDBCSpoolRepository allows James to use a JDBC compliant database -->
<!-- to hold messages that are on the spool. -->
<sqlDefs name="org.apache.james.mailrepository.JDBCSpoolRepository"><!-- Statements used to check whether a particular message exists in this repository. --><sql name="checkMessageExistsSQL">SELECT count(*) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to update a message stored in this repository. --><sql name="updateMessageSQL">UPDATE ${table} SET message_state = ?, error_message = ?, sender = ?, recipients = ?, remote_host = ?, remote_addr = ?, last_updated = ? WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to update the body of a message stored in this repository. --><sql name="updateMessageBodySQL">UPDATE ${table} SET message_body = ? WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to update the attributes of a message stored in this repository. --><sql name="updateMessageAttributesSQL">UPDATE ${table} SET message_attributes = ? WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to insert a message into this repository. --><sql name="insertMessageSQL">INSERT INTO ${table} (message_name,repository_name, message_state, error_message, sender, recipients,remote_host, remote_addr, last_updated, message_body,message_attributes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)</sql><!-- Statements used to retrieve a message stored in this repository. --><sql name="retrieveMessageSQL">SELECT message_state, error_message, sender, recipients, remote_host, remote_addr, last_updated FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to retrieve the body of a message stored in this repository. --><sql name="retrieveMessageBodySQL">SELECT message_body FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to retrieve the attributes of a message stored in this repository. --><sql name="retrieveMessageAttributesSQL">SELECT message_attributes FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to retrieve the size of the body of a message stored in this repository. --><!-- NOTE: This statement is optional and need not be implemented for a particular database to be supported. --><sql name="retrieveMessageBodySizeSQL" db="mssql">SELECT datalength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="mysql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="hypersonic">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="hsqldb">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="postgresql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="oracle">SELECT dbms_lob.getlength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="dm">SELECT dbms_lob.getlength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="db2">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><sql name="retrieveMessageBodySizeSQL" db="ingres">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to delete a message stored in this repository. --><sql name="removeMessageSQL">DELETE FROM ${table} WHERE message_name = ? AND repository_name = ?</sql><!-- Statements used to list all messages stored in this repository. --><sql name="listMessagesSQL">SELECT message_name, message_state, last_updated, error_message FROM ${table} WHERE repository_name = ? ORDER BY last_updated ASC</sql><!-- Statements used to create the table associated with this class. --><sql name="createTable" db="hypersonic">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients varchar NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body varchar NOT NULL ,message_attributes varchar NULL ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="hsqldb">CREATE CACHED TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients varchar NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body varchar NOT NULL ,message_attributes varchar NULL ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="mysql">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (100) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients text NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body longblob NOT NULL ,message_attributes longblob NULL ,last_updated datetime NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="mssql">CREATE TABLE [${table}] ([message_name] [varchar] (200) NOT NULL,[repository_name] [varchar] (255) NOT NULL,[message_state] [varchar] (30) NOT NULL ,[error_message] [varchar] (1000) NULL ,[sender] [varchar] (255) NULL ,[recipients] [text] NOT NULL ,[remote_host] [varchar] (255) NOT NULL ,[remote_addr] [varchar] (20) NOT NULL ,[message_body] [image] NOT NULL ,[message_attributes] [image] NULL ,[last_updated] [datetime] NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="oracle">CREATE TABLE ${table} (message_name varchar2(200) NOT NULL ,repository_name varchar2(255) NOT NULL ,message_state varchar2(30) NOT NULL ,error_message varchar2(200) NULL ,sender varchar2(255) NULL ,recipients varchar2(1000) NOT NULL ,remote_host varchar2(255) NOT NULL ,remote_addr varchar2(20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob NULL ,last_updated date NOT NULL ,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="dm">CREATE TABLE ${table} (message_name varchar2(200) NOT NULL ,repository_name varchar2(255) NOT NULL ,message_state varchar2(30) NOT NULL ,error_message varchar2(200) NULL ,sender varchar2(255) NULL ,recipients varchar2(1000) NOT NULL ,remote_host varchar2(255) NOT NULL ,remote_addr varchar2(20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob NULL ,last_updated date NOT NULL ,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="postgresql">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients text NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body bytea NOT NULL ,message_attributes bytea NULL ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="sapdb">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) NULL ,sender varchar (255) NULL ,recipients long NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body long byte NOT NULL ,message_attributes long byte NULL ,last_updated date NOT NULL,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="db2">CREATE TABLE ${table} (message_name varchar(200) NOT NULL ,repository_name varchar(255) NOT NULL ,message_state varchar(30) NOT NULL ,error_message varchar(200) ,sender varchar(255) ,recipients varchar(1000) NOT NULL ,remote_host varchar(100) NOT NULL ,remote_addr varchar(20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob ,last_updated timestamp NOT NULL ,PRIMARY KEY (repository_name, message_name))</sql><sql name="createTable" db="ingres">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) ,sender varchar (255) ,recipients LONG VARCHAR NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body LONG BYTE NOT NULL ,message_attributes LONG BYTE ,last_updated DATE NOT NULL)</sql><sql name="createTable" db="derby">CREATE TABLE ${table} (message_name varchar (200) NOT NULL,repository_name varchar (255) NOT NULL,message_state varchar (30) NOT NULL ,error_message varchar (200) ,sender varchar (255) ,recipients long varchar NOT NULL ,remote_host varchar (255) NOT NULL ,remote_addr varchar (20) NOT NULL ,message_body blob NOT NULL ,message_attributes blob ,last_updated timestamp NOT NULL,PRIMARY KEY (repository_name, message_name))</sql>
</sqlDefs><!-- SQL statements to support the BayesianAnalysis and the BayesianAnalysisFeeder mailets -->
<!-- -->
<sqlDefs name="org.apache.james.util.JDBCBayesianAnalyzer"><sql name="hamTableName">bayesiananalysis_ham</sql><sql name="spamTableName">bayesiananalysis_spam</sql><sql name="messageCountsTableName">bayesiananalysis_messagecounts</sql><!-- Statements used to retrieve the message counts. --><sql name="selectMessageCounts">SELECT HAMCOUNT, SPAMCOUNT FROM bayesiananalysis_messagecounts</sql><!-- Statements used to initialize the message counts. --><sql name="initializeMessageCounts">INSERT INTO bayesiananalysis_messagecounts (HAMCOUNT, SPAMCOUNT) VALUES (0,0)</sql><!-- Statements used to update the ham message counts. --><sql name="updateHamMessageCounts">UPDATE bayesiananalysis_messagecounts SET HAMCOUNT=(HAMCOUNT + ?)</sql><!-- Statements used to update the spam message counts. --><sql name="updateSpamMessageCounts">UPDATE bayesiananalysis_messagecounts SET SPAMCOUNT=(SPAMCOUNT + ?)</sql><!-- Statements used to retrieve the ham token counts. --><sql name="selectHamTokens">SELECT TOKEN, OCCURRENCES FROM bayesiananalysis_ham</sql><!-- Statements used to retrieve the spam token counts. --><sql name="selectSpamTokens">SELECT TOKEN, OCCURRENCES FROM bayesiananalysis_spam</sql><!-- Statements used to insert the ham token counts. --><sql name="insertHamToken">INSERT INTO bayesiananalysis_ham (TOKEN, OCCURRENCES) VALUES (?,?)</sql><!-- Statements used to insert the spam token counts. --><sql name="insertSpamToken">INSERT INTO bayesiananalysis_spam (TOKEN, OCCURRENCES) VALUES (?,?)</sql><!-- Statements used to update the ham token counts. --><sql name="updateHamToken">UPDATE bayesiananalysis_ham SET OCCURRENCES=(OCCURRENCES + ?) WHERE (TOKEN=?)</sql><!-- Statements used to update the spam token counts. --><sql name="updateSpamToken">UPDATE bayesiananalysis_spam SET OCCURRENCES=(OCCURRENCES + ?) WHERE (TOKEN=?)</sql><!-- Statements used to delete ham tokens. --><sql name="deleteHamTokens">DELETE FROM bayesiananalysis_ham</sql><!-- Statements used to delete spam tokens. --><sql name="deleteSpamTokens">DELETE FROM bayesiananalysis_spam</sql><!-- Statements used to delete message counts. --><sql name="deleteMessageCounts">DELETE FROM bayesiananalysis_messagecounts</sql><!-- Statements used to create the "ham" table (the 'token' field must be case sensitive). --><sql name="createHamTable" db="mysql">CREATE TABLE bayesiananalysis_ham (token varchar(128) binary NOT NULL default '',occurrences int(11) NOT NULL default '0',PRIMARY KEY (token)) TYPE=InnoDB</sql><sql name="createHamTable" db="mssql">CREATE TABLE [bayesiananalysis_ham] ([token] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL,[occurrences] [int] NOT NULL default (0),PRIMARY KEY (token))</sql><sql name="createHamTable" db="derby">CREATE TABLE bayesiananalysis_ham (token varchar(128) NOT NULL,occurrences INTEGER NOT NULL default 0,PRIMARY KEY (token))</sql><sql name="createHamTable" db="postgresql">CREATE TABLE bayesiananalysis_ham (token varchar(128) NOT NULL,occurrences int NOT NULL default 0,PRIMARY KEY (token))</sql><!-- Statements used to create the "spam" table (the 'token' field must be case sensitive). --><sql name="createSpamTable" db="mysql">CREATE TABLE bayesiananalysis_spam (token varchar(128) binary NOT NULL default '',occurrences int(11) NOT NULL default '0',PRIMARY KEY (token)) TYPE=InnoDB</sql><sql name="createSpamTable" db="mssql">CREATE TABLE [bayesiananalysis_spam] ([token] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL,[occurrences] [int] NOT NULL default (0),PRIMARY KEY (token))</sql><sql name="createSpamTable" db="derby">CREATE TABLE bayesiananalysis_spam (token varchar (128) NOT NULL,occurrences INTEGER  NOT NULL default 0,PRIMARY KEY (token))</sql><sql name="createSpamTable" db="postgresql">CREATE TABLE bayesiananalysis_spam (token varchar (128) NOT NULL,occurrences int  NOT NULL default 0,PRIMARY KEY (token))</sql><!-- Statements used to create the "message counts" table. --><sql name="createMessageCountsTable" db="mysql">CREATE TABLE bayesiananalysis_messagecounts (hamcount int(11) NOT NULL default '0',spamcount int(11) NOT NULL default '0') TYPE=InnoDB</sql><sql name="createMessageCountsTable" db="mssql">CREATE TABLE [bayesiananalysis_messagecounts] ([hamcount] [int] NOT NULL default (0),[spamcount] [int] NOT NULL default (0))</sql><sql name="createMessageCountsTable" db="derby">CREATE TABLE bayesiananalysis_messagecounts (hamcount INTEGER NOT NULL default 0,spamcount INTEGER  NOT NULL default 0)</sql><sql name="createMessageCountsTable" db="postgresql">CREATE TABLE bayesiananalysis_messagecounts (hamcount int NOT NULL default 0,spamcount int  NOT NULL default 0)</sql>
</sqlDefs><!-- SQL statements to support the WhiteListManager mailet and the IsInWhiteList matcher -->
<!-- -->
<sqlDefs name="WhiteList"><sql name="whiteListTableName">whitelist</sql><!-- Statements used to retrieve a single entry. --><sql name="selectByPK">SELECT localUser, localHost FROM whitelist where (localUser=? AND localHost=? AND remoteUser=? AND remoteHost=?)</sql><!-- Statements used to all entries by sender address. --><sql name="selectBySender">SELECT remoteUser, remoteHost FROM whitelist where (localUser=? AND localHost=?) ORDER BY remoteUser, remoteHost</sql><!-- Statements used to insert an entry. --><sql name="insert">INSERT INTO whitelist (localUser, localHost, remoteUser, remoteHost) VALUES (?,?,?,?)</sql><!-- Statements used to delete an entry. --><sql name="deleteByPK">DELETE FROM whitelist where (localUser=? AND localHost=? AND remoteUser=? AND remoteHost=?)</sql><!-- Statements used to create the "whitelist" table. --><sql name="createWhiteListTable" db="hypersonic">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))    </sql><sql name="createWhiteListTable" db="hsqldb">CREATE CACHED TABLE ${table} (CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))    </sql><sql name="createWhiteListTable" db="mysql">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) character set latin1 NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) character set latin1 NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)) TYPE=InnoDB</sql><sql name="createWhiteListTable" db="mssql">CREATE TABLE [whitelist] ([localUser] [varchar] (64) NOT NULL,[localHost] [varchar] (255) NOT NULL,[remoteUser] [varchar] (64) NOT NULL,[remoteHost] [varchar] (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql><sql name="createWhiteListTable" db="oracle">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql><sql name="createWhiteListTable" db="dm">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql><sql name="createWhiteListTable" db="postgresql">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql><sql name="createWhiteListTable" db="sapdb">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql><sql name="createWhiteListTable" db="db2">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql><sql name="createWhiteListTable" db="ingres">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql><sql name="createWhiteListTable" db="derby">CREATE TABLE whitelist (localUser varchar (64) NOT NULL,localHost varchar (255) NOT NULL,remoteUser varchar (64) NOT NULL,remoteHost varchar (255) NOT NULL,PRIMARY KEY (localUser, localHost, remoteUser, remoteHost))</sql></sqlDefs></sqlResources>

 关键字dm,其实就是复制一下oracle的sql,然后有特殊语句就自己修改一下


启动报错:

如果启动报错,可以在james-2.3.2\apps\james\logs查看日志

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/431128.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Dockerfile部署xxljob

使用Dockerfile部署xxljob 1. 背景 我们在使用定时任务调度时&#xff0c;通常会使用xxljob容器化部署xxljob&#xff0c;通常使用 docker pull xuxueli/xxl-job-admin:2.4.0 拉取镜像并启动容器。这种方式对于x86架构服务器来说&#xff0c;没有任何问题。但是在arm架构的服…

springboot项目引入了第三方jar包

应该把jar包放在resource目录下&#xff0c;新建一个lib目录放进去&#xff0c;不然打包的时候会报错找不到jar包&#xff0c;放入jar包&#xff0c;右键添加到库&#xff0c;才可以使用。 _g().startMarquee();

MapReduce基本原理

目录 整体执行流程​ Map端执行流程 Reduce端执行流程 Shuffle执行流程 整体执行流程 八部曲 读取数据--> 定义map --> 分区 --> 排序 --> 规约 --> 分组 --> 定义reduce --> 输出数据 首先将文件进行切片&#xff08;block&#xff09;处理&#xff…

【C语言】猜数字游戏

个人主页 &#xff1a; zxctscl 如有转载请先通知 文章目录 前言1. 随机数生成1.1 rand1.2 srand1.3 time1.4 设置随机数的范围 2. 猜数字游戏实现2.1 游戏菜单2.2 主函数部分2.3 game函数部分2.4 附代码2.5 优化代码 前言 前面学习的这些知识&#xff0c;我们就可以写一些稍微…

常见统计量与其抽样分布

什么是统计量 我们首先给出统计量的定义:设 X 1 , X 2 , ⋯ , X n X_1,X_2,\cdots,X_n X1​,X2​,⋯,Xn​ 为来自于总体X的一个样本&#xff0c; g ( X 1 , X 2 , ⋯ , X n ) g(X_1,X_2,\cdots,X_n) g(X1​,X2​,⋯,Xn​) 为关于 X 1 , X 2 , ⋯ , X n X_1,X_2,\cdots,X_n X…

C++ STL容器(三) —— 迭代器底层剖析

本篇聚焦于STL中的迭代器&#xff0c;同样基于MSVC源码。 文章目录 迭代器模式应用场景实现方式优缺点 UML类图代码解析list 迭代器const 迭代器非 const 迭代器 vector 迭代器const 迭代器非const迭代器 反向迭代器 迭代器失效参考资料 迭代器模式 首先迭代器模式是设计模式中…

linux网络编程7

24.9.24学习目录 一.网络通信过程&#xff08;续&#xff09;1.路由器 二.原始套接字&#xff08;SOCK_RAW&#xff09;1.创建原始套接字2.数据包解析 一.网络通信过程&#xff08;续&#xff09; 1.路由器 路由器是用于连接多个逻辑上分开的网络&#xff1b; 具有判断网络地…

React-Native 中使用 react-native-image-crop-picker 在华为手机上不能正常使用拍照功能

背景: React-Native 0.66 中使用 react-native-image-crop-picker 在安卓 华为手机上不能正常使用拍照功能, 其他品牌正常 代码如下: import ImagePicker from react-native-image-crop-picker;ImagePicker.openCamera(photoOptions).then(image > {callback(image);}) …

不靠学历,不拼年资,怎么才能月入2W?

之前统计局发布了《2023年城镇单位就业人员年平均工资情况》&#xff0c;2023年全国城镇非私营单位和私营单位就业人员年平均工资分别为120698元和68340元。也就是说在去年非私营单位就业人员平均月薪1W&#xff0c;而私营单位就业人员平均月薪只有5.7K左右。 图源&#xff1a;…

DownShift: Tuning Shift Reduction With Reliability for Racetrack Memories

目录 DownShift: Tuning Shift Reduction With Reliability for Racetrack Memories文章摘要&#xff1a;文章的主要贡献包括&#xff1a;文章的结构如下&#xff1a;DownShiftDownShift通过以下方式改进了现有的数据放置策略&#xff1a; GROGU&#xff08;Generating Reliabi…

简单题94. 二叉树的中序遍历 (python)20240921

问题描述&#xff1a; python&#xff1a; # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val0, leftNone, rightNone): # self.val val # self.left left # self.right right class Solution(object…

【重学 MySQL】三十七、聚合函数

【重学 MySQL】三十七、聚合函数 基本概念5大常用的聚合函数COUNT()SUM()AVG()MAX()MIN() 使用场景注意事项示例查询 聚合函数&#xff08;Aggregate Functions&#xff09;在数据库查询中扮演着至关重要的角色&#xff0c;特别是在处理大量数据时。它们能够对一组值执行计算&a…

图书管理系统实现

图书管理系统实现 图书管理系统作用图书管理系统绘图创建Book创建BookListOperation包下代码User包AdminUserNomalUser Main方法整体代码&#xff08;带有注释&#xff09;Opertaion包下的代码IOpertaion&#xff08;接口&#xff09;Add添加图书代码Dele删除图书代码Borrow借阅…

PyTorch 池化层详解

在深度学习中&#xff0c;池化层&#xff08;Pooling Layer&#xff09;是卷积神经网络&#xff08;CNN&#xff09;中的关键组成部分。池化层的主要功能是对特征图进行降维和减少计算量&#xff0c;同时增强模型的鲁棒性。本文将详细介绍池化层的作用、种类、实现方法&#xf…

C++——多线程编程(从入门到放弃)

进程&#xff1a;运行中的程序 线程&#xff1a;进程中的进程 线程的最大数量取决于CPU的核心数 一、将两个函数添加到不同线程中 demo&#xff1a;两个函数test01()和test02()&#xff0c;实现将用户输入的参数进行打印输出1000次 将这两个函数均放到独立的线程t1和t2中&…

vue3+element-plus icons图标选择组件封装

一、最终效果 二、参数配置 1、代码示例 <t-select-icon v-model"selectVlaue" />2、配置参数&#xff08;Attributes&#xff09;继承 el-input Attributes 参数说明类型默认值v-model绑定值string-prefixIcon输入框前缀iconstringSearchisShowSearch是否显…

从角速度向量的角度理解姿态角速度和机体角速度的转换公式

一、什么是姿态角速度 这是我从《多旋翼飞行器设计和控制》上截取的关于欧拉角的定义。无人机的姿态角速度即偏航角、俯仰角、滚转角的一次导数&#xff0c;分别是、、。 二、什么是机体角速度 这是我在网上随便找的图&#xff0c;展示了机体坐标系。这个坐标系与飞机固定连接&…

【软件测试】详解测试中常用的几种测试方法

目录 一、集成测试二、 系统测试三、验收测试四、回归测试 总结 一、集成测试 术语 集成测试是继组件测试之后的又一个层次。集成测试假定交给这个层次的测试对象已经经过了组件测试&#xff0c;并且任何组件内部的缺陷都已经尽可能地被纠正。 集成 开发人员、测试人员和专…

6种常见位运算符+异或运算符的使用(加密、解密)

一、位运算符 位运算符进行的是整数与整数之间的运算 1、右移运算符&#xff1a;>> &#xff08;1&#xff09;相当于对整数除以2 &#xff08;2&#xff09;举例&#xff1a; int num 2; System.out.println(num >> 1); 2、左移运算符&#xff1a;<< …

定制智慧科技展厅方案:哪些细节是成功的秘诀?

随着数字科技浪潮的迅猛推进&#xff0c;智慧科技展厅跃升为科技成果展示与技术对话的前沿阵地。其策划与实施方案因而显得尤为关键。在此过程中&#xff0c;精雕细琢每一环节&#xff0c;确保创意与技术的无缝对接&#xff0c;成为不可或缺的要点。现在&#xff0c;让我们深入…