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.mzph.cn/news/879899.shtml

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

相关文章

oracle表的类型

表是数据库最基本的逻辑结构&#xff0c;一切数据都存放在表中&#xff0c;其它数据库对象(索引、视图、同义词等)都是为了更方便的操作表中的数据。Oracle数据库是由若干个表组成&#xff0c;每个表由列和行组成。 数据库表的类型按照存储结构划分&#xff1a; (1)普通表&…

SpringBoot开发——获取HTTP请求头(Header)的三种方法

文章目录 方法一&#xff1a;使用HttpServletRequest实现原理方法二&#xff1a;使用RequestContextHolder实现原理方法三&#xff1a;使用RequestHeader注解实现原理总结 在Spring Boot应用中&#xff0c;获取HTTP请求头&#xff08;Header&#xff09;信息是常见的需求&#…

C# 技巧在 foreach 循环中巧妙获取索引

目录 前言 使用 LINQ 和扩展方法 直接在 LINQ 查询中使用 使用 LINQ 的 Select() 与 Enumerable.Range() 总结 最后 前言 在C#中foreach 循环是处理集合的常见方式&#xff0c;因其简洁性和易读性而广受青睐。 但是在某些情况下&#xff0c;我们需要同时获取集合中元素的…

Unity—Transform类-position

概要 游戏对象&#xff08;GameObject&#xff09;位移、旋转、缩放、父子关系、坐标转换等相关操作都由它处理 是Unity提供的极其重要的类 Vector3 Vector3主要是用来表示三维坐标系中的 一个点 或者一个向量 申明 Vector3 v new Vector3(); v.x …

如何限制任何爬虫爬取网站的图片

随着网络爬虫技术的普及&#xff0c;网站的图片、内容和数据容易被恶意爬取。这不仅可能导致带宽资源的浪费&#xff0c;还会侵犯图片版权和私密性。因此&#xff0c;许多网站管理员希望限制或阻止爬虫爬取网站的图片。本文将介绍一些有效的技术和方法&#xff0c;帮助网站管理…

[深度学习]神经网络

1 人工神经网络 全连接神经网络 2 激活函数 隐藏层激活函数由人决定输出层激活函数由解决的任务决定: 二分类:sigmoid多分类:softmax回归:不加激活(恒等激活identify)2.1 sigmoid激活函数 x为加权和小于-6或者大于6,梯度接近于0,会出现梯度消失的问题即使取值 [-6,6] ,…

头戴式蓝牙耳机性价比高的有哪些?四款高能性价比机型对比推荐

在当今科技日新月异的时代&#xff0c;头戴式蓝牙耳机已经成为了我们日常生活中不可或缺的一部分&#xff0c;无论是通勤路上、健身房内还是家中休闲时&#xff0c;一副优质的头戴式蓝牙耳机都能为我们带来沉浸式的听觉体验&#xff0c;那么头戴式蓝牙耳机性价比高的有哪些&…

练习题 - Django 4.x Models CRUD(增、删、改、查)函数方法

在 web 应用程序开发中,数据的增、删、改、查(CRUD)操作是最基本的功能之一。Django 作为一个高效的 web 框架,提供了强大的 ORM(对象关系映射)功能,使得开发者可以通过 Python 代码直接操作数据库,而不需要编写繁琐的 SQL 语句。这种简化和抽象帮助开发者快速构建、测…

模版结构体没有可用成员(C3203)

没有typedef模版结构体而导致。 并且_tables[index]无法访问HashData内部的成员。

Windows系统使用PHPStudy搭建Cloudreve私有云盘公网环境远程访问

文章目录 1、前言2、本地网站搭建2.1 环境使用2.2 支持组件选择2.3 网页安装2.4 测试和使用2.5 问题解决 3、本地网页发布3.1 cpolar云端设置3.2 cpolar本地设置 4、公网访问测试5、结语 1、前言 自云存储概念兴起已经有段时间了&#xff0c;各互联网大厂也纷纷加入战局&#…

Vue(13)——router-link

router-link vue-router提供了一个全局组件router-link(取代a标签) 能跳转&#xff0c;配置to属性指定路径&#xff08;必须&#xff09;。本质还是a标签。默认会提供高亮类名&#xff0c;可以直接设置高亮样式 右键检查&#xff0c;发现多了两个类&#xff1a; 可以直接写样式…

【Python】探索 Errbot:多功能聊天机器人框架

不是旅行治愈了你&#xff0c;是你在路上放过了自己。 在当今的数字化时代&#xff0c;聊天机器人已成为企业与客户互动、提升工作效率和增加乐趣的重要工具。Errbot是一个高度可扩展的聊天机器人框架&#xff0c;它允许开发者使用Python轻松创建和定制机器人。本文将介绍Errb…

大型语言模型 (LLM) 劫持攻击不断升级,导致每天损失超过 100,000 美元

Sysdig 威胁研究团队 (TRT) 报告称&#xff0c;LLMjacking&#xff08;大型语言模型劫持&#xff09;事件急剧增加&#xff0c;攻击者通过窃取的云凭证非法访问大型语言模型 (LLM)。 这一趋势反映了 LLM 访问黑市的不断增长&#xff0c;攻击者的动机包括个人使用和规避禁令和制…

【webpack4系列】编写可维护的webpack构建配置(四)

文章目录 构建配置包设计功能模块设计和目录结构设计功能模块设计目录结构设计 使用ESLint规范构建脚本冒烟测试介绍和实际运用冒烟测试 (smoke testing)冒烟测试执行判断构建是否成功判断基本功能是否正常 单元测试和测试覆盖率测试框架编写单元测试用例单元测试接入测试覆盖率…

Ubuntu截图工具flameshot

最近在使用香橙派做一些东西&#xff0c;有些内容需要截图记录&#xff0c;这里记录一下截图工具的安装和使用过程&#xff0c;方便以后查阅。 Ubuntu截图工具flameshot flameshot 简介flameshot 安装flameshot 相关命令 flameshot 简介 linux系统里面最好用的截屏工具支持图形…

基于python+django+vue的旅游网站系统

作者&#xff1a;计算机学姐 开发技术&#xff1a;SpringBoot、SSM、Vue、MySQL、JSP、ElementUI、Python、小程序等&#xff0c;“文末源码”。 专栏推荐&#xff1a;前后端分离项目源码、SpringBoot项目源码、SSM项目源码 系统展示 【2025最新】基于协同过滤pythondjangovue…

计算机四级-计算机网络

一、基础知识 1.对计算机网络发展具有重要影响的广域网是&#xff1a;ARPANET 随机争用型的介质访问控制方法起源于&#xff1a;ALOHANET 2.计算机网络发展阶段&#xff1a; A&#xff09;第一阶段的主要成果是计算机技术与通信技术的结合 B&#xff09;第二阶段的主要成果…

【Linux】线程池(第十八篇)

目录 线程池的概念 线程池的基本组成 实现方式 1. 定义任务 2. 创建线程池 3. 初始化和销毁线程池 4. 添加任务 注意事项 线程池的概念 线程池&#xff08;Thread Pool&#xff09;是一种基于池化技术设计用于管理线程的资源池。它预先创建并维护多个线程&#xff0c;…

【例题】lanqiao4425 咖啡馆订单系统

样例输入 3 2 2 1 3 1 2样例输出 3 2样例说明 输入的数组为&#xff1a;【3&#xff0c;1&#xff0c;2】 增量序列为&#xff1a;【2&#xff0c;1】 当增量 h2&#xff1a;对于每一个索引 i&#xff0c;我们会将数组元素 arr[i] 与 arr[i−h] 进行比较&#xff0c;并进行可…

电线电缆制造5G智能工厂物联数字孪生平台,推进制造业数字化转型

电线电缆制造行业作为关键的基础设施建设领域&#xff0c;正积极拥抱新技术&#xff0c;推动生产方式的深刻变革。电线电缆制造5G智能工厂物联数字孪生平台的兴起&#xff0c;不仅为行业注入了新的活力&#xff0c;更为制造业的数字化转型树立了新的标杆。 电线电缆制造5G智能…