Spring

xiaoxiao2021-03-05  25

Web.xml configuration

Literature set character encoding com.highcom.literate.util.SetChacterencodingfilter Encoding GBK set character encoding / * LITERATURE Org.springframework.web.servlet.dispatcherservlet contextconfiglocation /Web-inf/literate-servlet.xml /web-inf/dataaccessContext.xml /Web-inf/ServiceContext.xml /web-inf/myopusactions.xml /web-inf/otheropusactions.XML / Web-INF / SYSMANAGERACTI Ons.xml 2 Litrate *. do PAGINATION.TLD / web-inf / PAGINATION .TLD http://www.springframework.org/tags <

/ taglib-uri> /web-inf/spring.tld Literature-Servlet.xml

ViewRenderer < Value> Org.SpringFramework.Web.Servlet.view.jstlview / web-inf / view / .jsp view resolution 2 / web- INF / View File Upload parser default request matcher < / bean> correct view name / front / main Error View Name / front / error Error View Name / front / error sysmanageractions.xml

<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@jin "/>

- provincial information management -> - Delete province information -> < Entry key = "/ config / city / cityifo.do">

/config/city/delcityInfo.do> <非 非 创 分 分 信息 信息 - -> <"Edit non-original work classification information ->

- Edit Non Original Works ->

/ otheropus/otherchapter/Editotherchapter.do ">

Background Management Home manage - system management Homepage Background Management - System Management LEFT Page Manage - Management section - State Information Management manage - management section - State Add manage - column management - State information edit Background Management - Column Management - City Information Management

/> Backstage Management - Column Management - City Information Add < / description> < bean id = "editcityinfo" class = "com.highcom.literature.sysconfig.cityinfo.web.controller.EditCityinfoController"> manage - Topic management - city information edit Background Management - Column Management - City Information Delete <

/ Bean> Manage - Column Management - Authors Guild Add manage - part management - writers Association information edit Background Management - Column Management - Writers Association Information Delete <

Bean id = "addothersort1" class = "com.highcom.literature.indroller.com.addothersort1controller"> non-original work - classification management - non-original work classification Add Non-Original Works - Classification Management - Non-Original Works Category Editor non-original works - Category management - non original works classified delete Non-original work - classification management - non-original work classification 2 Add <

ref bean = "adminOthersort1Service" /> non-original works - Category management - non original works Category 2 edit < Description> Non-original works - Work management - non-original works Add Non-Original Works - Works Management - Non-Original Works Delete Non-original works - Works Management - Non-Original Chapter Management <

/ bean> non-original works - Work management - Non-Original chapters Add < property name = "adminOthersort1Service"> < ref bean = "adminOtherchapterService" /> non original works - works management - non original works chapter editing non-original works - Works Management - Non original works section delete

approval process management controller workflow template editing controller < / property> add workflow template junction controller Workflow mode Node Editing Controller workflow template node controller deleted workflow stencil art add node controller workflow template junction Personnel Delete Controller background create user controls Press information controller <

/ Property> delete published Social Information Controller Test file upload

DataAccessContext.xml

Oracle.jdbc .driver.racledriver jdbc: Oracle: Thin: @ 192.168.255.15: 1521: Highcom Literature 1234

jdbc: microsoft: SQLServer: //127.0.0.1: 1433; DatabaseName = LITERATURE sa sa -> Oracleds -> PROPAGATION_REQUIRED

<

ref bean = "sequenceService" />

< Bean id = "sortdaoimum" class = "

com.highcom.jdbc.sortdaojdbcimpl "> Propagation_required, readonly prOPagation_required PROPAGATION_REQUIRED, readOnly Propagation_required < / bean> <

PROPS> propAgation_required PROPAGATION_REQUIRED, Readonly PropAgation_required prOPagation_required, readonly PROPAGATION_REQUIRED PropAgation_required, readonly Propagation_required <

/ Property> < Props> propagation_required PROPAGATION_REQUIRED, Readonly PropAgation_required propagation_required PROPAGATION_REQUIRED, readOnly PROPAGATION_REQUIRED < / props> Propagation_required, readonly PropAgation_required Propagation_required, readonly propagation_required PROPAGATION_REQUIRED, readOnly <

/ prop> PROPAGATION_REQUIRED, readOnly PROPAGATION_REQUIRED propagation_required, readonly I will paste a few Representative class

/ * Generated by together * /

Package com.highcom.literature.account;

Import com.highcom.literature.account.domain.account;

Public interface accountService {/ ** * Add an account * @Throws UseRexistexception * / void addaccount (Account Account) throws usexistexception;

/ ** * Delete an account, false delete. * / Void deleteAccount (string username); Void deleteAccount (INT ID);

/ ** * Modify account * / void modifyAccount (Account Account);

/ ** * Show all accounts * @Return Accent [] * / account [] getaccount ();

/ ** * get the specified account according to the user name * @Param Accountid string * @return account * / account getaccount (String username); / ** * acquire the specified account according to user ID * @Param Accountid * @return * / account getaccount int accountID); / ** * disable an account * @param accountID String * / void setDisavailable (String accountID); / ** * verify the user name and password are correct * @param username String * @param password String * @return int 0 through , 1 user disabled, 2 username or password error * / int Authorize (String username, string password);} / * generated by together * / package com.highcom.literature.account;

Import com.highcom.dao. *; import com.highcom.literature.account.domain. *; import com.highcom.workflow. *; import com.highcom.workflow.domain.workflowtemplate;

public class AccountServiceImpl implements AccountService {private AccountDao accountDao; private WorkflowService workflowService; / ** * add an account * @throws UserExistException * / public void addAccount (Account account) throws UserExistException {WorkflowTemplate workflowT = workflowService.getDefaultWorkflow (); // Set default Workflow template Account.setassess_level (Integer.Parseint ()))); accountdao.addaccount (account);}

/ ** * Delete an account, false delete. * / Public void deleteAccount (string username) {accountdao.deleteaccount (username);} public void deleteAccount (int id) {accountdao.deleteaccount (ID);}

/ ** * Modify account * / public void modifyAccount (Account Account) {AccountDao.ModifyAccount (Account);}

/ ** * Show all accounts * @Return Account [] * / public account [] getaccount () {return ancountdao.getaccount ();

/ * Get the specified account ** * @param accountID String * @return Account * / public Account getAccount (String username) {return accountDao.getAccount (username);} public Account getAccount (int accountID) {return accountDao.getAccount (accountID) ;} / ** * Disable account * @Param Accountid String * / public void setdisavailable (String Accountid) {}

Public void setaccountdao (accountdao accountdao) {this.accountdao = accountdao;

Public void setworkflowservice (toolflowservice) {this.workflowservice = workflowservcle;

Public Accountdao getaccountdao () {Return Accentdao;

Public WorkflowService getWorkflowService () {Return WorkflowService;

/ ** * Verify that the username password is correct * @Param username string * @param password string * @Return INT 0 passed, 1 user disable, 2 username or password error * / public int authorize (String username, string password) { Return Accentdao.authorize (username, password);}} / * generated by together * /

Package com.highcom.literature.account.dao;

Import com.highcom.literate.account.userexistexception; import com.highcom.literature.account.domain.account;

Public interface accountdao {/ ** * Add an account * @Throws UseRexistexception * / void addaccount (Account Account) throws usexistexception;

/ ** * Delete an account, false delete. * / Void deleteaccount (string username); void deleteAccount (int ID); / ** * Modify account * / void modifyAccount (Account Account);

/ ** * Show all accounts * @Return Accent [] * / account [] getaccount ();

/ ** * Get the designated account * @param accountID String * @return Account * / Account getAccount (String username); Account getAccount (int accountID); / ** * Disable an account * @param accountID String * / void setDisavailable (String accountID ); / ** * Verify that the username password is correct * @Param username string * @param password string * @Return INT 0 passed, 1 user disabled, 2 username or password error * / int Authorize (String username, String password) } / * Generated by together * / package com.highcom.literature.account.dao.jdbc;

import com.highcom.literature.account.UserExistException; import com.highcom.literature.account.domain.Account; import com.highcom.literature.account.dao.AccountDao; import org.springframework.jdbc.core.support *.; import java.sql.Types; import com.highcom.seqgen.SequenceService; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.dao.DataAccessException; import java.sql.ResultSet; import java.sql.SQLException;

/ ** @Todo The following method's JDBC operation does not complete * / public class accountdaojdbcimpl extends JDBCDAOSUPPORT IMPLEments Accentdao {Private SequenceService SequenceService;

/ ** * Add an account * * @throws UserExistException * / public void addAccount (Account account) throws UserExistException {Object obj = this.getJdbcTemplate (). Query ( "select username from t_author_account where username =?", New Object [] {new String (account.getUsername ())}, new int [] {Types.VARCHAR}, new ResultSetExtractor () {public Object extractData (ResultSet rs) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = New Account (); Temp.setUsername (RS.GetString ("UserName")); return null;}}; if (obj! = null) throw new useXistexception ("The user name already exists." ); // Get id string id = sequenceService.getValue ("com.highcom.literature.account"); // Take the current system time java.sql.timestamp date = new java.sql.timestamp (system .currenttimemillis () ); Excount.setjoin_date (Date); this .GetjdbcTemplate () .Update ("INSERT INTO T_AUTHOR_ACCOUNT (Account_ID, Username, Password, Name, SEX, Email," "BIR THDAY, Province, Postcode, Phone, Fax, Mobile, " " Photo, overview, join_date, assess_level) Values ​​(?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?), New object [] {new integer (ID),

Accent.getusername (), Account.getPassword (), Account.getName (), new integer (Account.getSex (), Account.GeteMail (), Account.getBIRTHDAY (), Account.getProvince (), Account.getPince (), Account.getCity ), Account.getconfraternity (), account.getaddress (), account.getpostcode (), account.getphone (), Account.getMobile (), Account.getPhone (), Account.getphone (), Account.getoverView (), ACCOUNT.GETOVERVIEW (), Account.getJoin_Date (), new integer (account.getassess_level ())}, new int [] {types.integer, types.varchar, types.varchar, types.varchar, types.integer, types.varchar, types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.varchar, Types.TimeStamp, Types.integer}); } / ** * Delete an account, false delete. * / Public void deleteAccount (string username) {}

Public void deleteAccount (int ID) {}

/ ** * Modify account * / public void modifyAccount (Account Account) {}

/ ** * Show all accounts * * @Return Accent [] * / public account [] getaccount () {Return null;}

/ ** * Get the designated account * * @param accountID * String * @return Account * / public Account getAccount (String username) {Object obj = this.getJdbcTemplate (). Query ( "select * from t_author_account where username =?", new Object [] {username}, new int [] {Types.VARCHAR}, new ResultSetExtractor () {public Object extractData (ResultSet rs) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = new Account ( ); Temp.setAccount_id (rs.getstring); temp.setusername (RS.GetString ("UserName")); Temp.Setassess_level (Rs.GetInt ("Assess_level"); return temp;} return null ;}}); return (Account) obj;. "? select * from t_author_account where account_id ="} public Account getAccount (int accountID) {Object obj = this.getJdbcTemplate () query (, new Object [] {new String ( Accentid "" "}, new int [] {types.integer}, new resultsetextractor () {public Object ExtractData (ResultSet RS) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = new Account (); temp.setAccount_id (rs.getString ( "account_id")); temp.setUsername (rs.getString ( "username")); Temp.setassess_level (Rs.Getint ("Assess_level")); Return Temp;} Return NULL;}}); Return (Account) Obj;}

/ ** * Disable account * @Param Accountid * string * / public void setdisavailable (String Accountid) {}

/ ** * Verify that the username password is correct * * @Param username * string * @Param password * string * @Return INT 0 passed, 1 user disabled, 2 username or password error * / public int authorize (String Username, String password) {Object obj = this .getJdbcTemplate () .query ( "select username from t_author_account where username =? and password =?", new Object [] {username, password}, ​​new int [] {Types.VARCHAR, Types. VARCHAR}, new ResultSetExtractor () {public Object extractData (ResultSet rs) throws SQLException, DataAccessException {if (rs.next ()) {Account temp = new Account (); // temp.setAccount_id (rs.getString ( "account_id" ))); // Temp.setUsername (Rs.getstring ("UserName")); // Temp.setassess_level (Rs.Getint ("Assess_level")); return null;}}}); if (Obj = = NULL) RETURN 2; Else Return 0; PUBLIC VOID SEQUENCESERVICE (SEQUENCESERVICE SEQUENCESERVICE) {this.seq UenceService = sequenceService;

Public sequenceService Getsequence () {return sequenceService;

}

转载请注明原文地址:https://www.9cbs.com/read-35579.html

New Post(0)