主要跳轉(zhuǎn)頁面為404,控制臺(tái)不報(bào)錯(cuò)。。下面是index.jsp頁面點(diǎn)擊鏈接跳轉(zhuǎn)到404控制臺(tái)部分信息(我在service類和dao類中添加了”static{System.out.print("XX========")}“這句話所以控制臺(tái)有顯示)二月?20,?2017?6:32:35?下午?org.springframework.beans.factory.xml.XmlBeanDefinitionReader?loadBeanDefinitions
信息:?Loading?XML?bean?definitions?from?file?[C:\Users\k570\NeonWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SSH-1\WEB-INF\classes\applicationContext.beans.xml]
二月?20,?2017?6:32:35?下午?org.springframework.beans.factory.xml.XmlBeanDefinitionReader?loadBeanDefinitions
信息:?Loading?XML?bean?definitions?from?file?[C:\Users\k570\NeonWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SSH-1\WEB-INF\classes\applicationContext.xml]
二月?20,?2017?6:32:36?下午?org.springframework.context.support.PropertySourcesPlaceholderConfigurer?loadProperties
信息:?Loading?properties?file?from?class?path?resource?[db.properties]
Dao====================================
二月?20,?2017?6:32:36?下午?com.mchange.v2.log.MLog?<clinit>
信息:?MLog?clients?using?java?1.4+?standard?logging.
二月?20,?2017?6:32:36?下午?com.mchange.v2.c3p0.C3P0Registry?banner
信息:?Initializing?c3p0-0.9.1.2?[built?21-May-2007?15:04:56;?debug??true;?trace:?10]
ERROR?StatusLogger?Log4j2?could?not?find?a?logging?implementation.?Please?add?log4j-core?to?the?classpath.?Using?SimpleLogger?to?log?to?the?console...
二月?20,?2017?6:32:39?下午?com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource?getPoolManager
信息:?Initializing?c3p0?pool...?com.mchange.v2.c3p0.ComboPooledDataSource?[?acquireIncrement?->?3,?acquireRetryAttempts?->?30,?acquireRetryDelay?->?1000,?autoCommitOnClose?->?false,?automaticTestTable?->?null,?breakAfterAcquireFailure?->?false,?checkoutTimeout?->?0,?connectionCustomizerClassName?->?null,?connectionTesterClassName?->?com.mchange.v2.c3p0.impl.DefaultConnectionTester,?dataSourceName?->?2vsidn9mp9rw8y17kco88|5854e24c,?debugUnreturnedConnectionStackTraces?->?false,?description?->?null,?driverClass?->?com.mysql.jdbc.Driver,?factoryClassLocation?->?null,?forceIgnoreUnresolvedTransactions?->?false,?identityToken?->?2vsidn9mp9rw8y17kco88|5854e24c,?idleConnectionTestPeriod?->?0,?initialPoolSize?->?5,?jdbcUrl?->?jdbc:mysql:///ssh,?maxAdministrativeTaskTime?->?0,?maxConnectionAge?->?0,?maxIdleTime?->?0,?maxIdleTimeExcessConnections?->?0,?maxPoolSize?->?10,?maxStatements?->?0,?maxStatementsPerConnection?->?0,?minPoolSize?->?3,?numHelperThreads?->?3,?numThreadsAwaitingCheckoutDefaultUser?->?0,?preferredTestQuery?->?null,?properties?->?{user=******,?password=******},?propertyCycle?->?0,?testConnectionOnCheckin?->?false,?testConnectionOnCheckout?->?false,?unreturnedConnectionTimeout?->?0,?usesTraditionalReflectiveProxies?->?false?]
Mon?Feb?20?18:32:40?CST?2017?WARN:?Establishing?SSL?connection?without?server's?identity?verification?is?not?recommended.?According?to?MySQL?5.5.45+,?5.6.26+?and?5.7.6+?requirements?SSL?connection?must?be?established?by?default?if?explicit?option?isn't?set.?For?compliance?with?existing?applications?not?using?SSL?the?verifyServerCertificate?property?is?set?to?'false'.?You?need?either?to?explicitly?disable?SSL?by?setting?useSSL=false,?or?set?useSSL=true?and?provide?truststore?for?server?certificate?verification.
Mon?Feb?20?18:32:40?CST?2017?WARN:?Establishing?SSL?connection?without?server's?identity?verification?is?not?recommended.?According?to?MySQL?5.5.45+,?5.6.26+?and?5.7.6+?requirements?SSL?connection?must?be?established?by?default?if?explicit?option?isn't?set.?For?compliance?with?existing?applications?not?using?SSL?the?verifyServerCertificate?property?is?set?to?'false'.?You?need?either?to?explicitly?disable?SSL?by?setting?useSSL=false,?or?set?useSSL=true?and?provide?truststore?for?server?certificate?verification.
Mon?Feb?20?18:32:40?CST?2017?WARN:?Establishing?SSL?connection?without?server's?identity?verification?is?not?recommended.?According?to?MySQL?5.5.45+,?5.6.26+?and?5.7.6+?requirements?SSL?connection?must?be?established?by?default?if?explicit?option?isn't?set.?For?compliance?with?existing?applications?not?using?SSL?the?verifyServerCertificate?property?is?set?to?'false'.?You?need?either?to?explicitly?disable?SSL?by?setting?useSSL=false,?or?set?useSSL=true?and?provide?truststore?for?server?certificate?verification.
Mon?Feb?20?18:32:40?CST?2017?WARN:?Establishing?SSL?connection?without?server's?identity?verification?is?not?recommended.?According?to?MySQL?5.5.45+,?5.6.26+?and?5.7.6+?requirements?SSL?connection?must?be?established?by?default?if?explicit?option?isn't?set.?For?compliance?with?existing?applications?not?using?SSL?the?verifyServerCertificate?property?is?set?to?'false'.?You?need?either?to?explicitly?disable?SSL?by?setting?useSSL=false,?or?set?useSSL=true?and?provide?truststore?for?server?certificate?verification.
Mon?Feb?20?18:32:40?CST?2017?WARN:?Establishing?SSL?connection?without?server's?identity?verification?is?not?recommended.?According?to?MySQL?5.5.45+,?5.6.26+?and?5.7.6+?requirements?SSL?connection?must?be?established?by?default?if?explicit?option?isn't?set.?For?compliance?with?existing?applications?not?using?SSL?the?verifyServerCertificate?property?is?set?to?'false'.?You?need?either?to?explicitly?disable?SSL?by?setting?useSSL=false,?or?set?useSSL=true?and?provide?truststore?for?server?certificate?verification.
service========================================
二月?20,?2017?6:32:42?下午?org.springframework.web.context.ContextLoader?initWebApplicationContext
信息:?Root?WebApplicationContext:?initialization?completed?in?6972?ms
二月?20,?2017?6:32:44?下午?org.apache.coyote.AbstractProtocol?start
信息:?Starting?ProtocolHandler?[http-nio-8080]
二月?20,?2017?6:32:44?下午?org.apache.coyote.AbstractProtocol?start
信息:?Starting?ProtocolHandler?[ajp-nio-8009]
二月?20,?2017?6:32:44?下午?org.apache.catalina.startup.Catalina?start
信息:?Server?startup?in?12652?ms下面是項(xiàng)目結(jié)構(gòu)以下按照一般流程貼代碼---actions.EmployeeAction(我在這個(gè)類中初始化時(shí)向控制臺(tái)打印一句話,方法中也添加了,然而控制臺(tái)并沒有打印這個(gè)類中的任何一句話)package?actions;
import?java.util.Map;
import?org.apache.struts2.interceptor.RequestAware;
import?com.opensymphony.xwork2.ActionSupport;
import?service.EmployeeService;
public?class?EmployeeAction?extends?ActionSupport?implements?RequestAware{
????static{
???????
????????System.out.println("是否進(jìn)入此類?-------------------------");
????????
????}
????private?static?final?long?serialVersionUID?=?1L;
????
????private?EmployeeService?employeeService;
????
????public?void?setEmployeeService(EmployeeService?employeeService)?{
????????this.employeeService?=?employeeService;
????}
????
????public?String?list()?{
????????request.put("employees",?employeeService.getAll());
????????System.out.println("====================方法被執(zhí)行===================");
????????return?"list";
????}
???????
????private?Map<String?,?Object>?request;
????
????@Override
????public?void?setRequest(Map<String,?Object>?arg0)?{
????????this.request?=?arg0;
????}
????
}---service.EmployeeServicepackage?service;
import?java.util.List;
import?dao.EmployeeDao;
import?entity.Employee;
public?class?EmployeeService?{
????static{
????????System.out.println("service========================================");
????}
????
????private?EmployeeDao?employeeDao;
????
???public?void?setEmployeeDao(EmployeeDao?employeeDao)?{
????
???????this.employeeDao?=?employeeDao;
}
????
????public?List<Employee>?getAll()?{
????????
????????return?employeeDao.getAll();????
????}
}---dao.EmployeeDaopackage?dao;
import?java.util.List;
import?org.hibernate.Session;
import?org.hibernate.SessionFactory;
import?entity.Employee;
public?class?EmployeeDao?{
????
????static{
????????System.out.println("Dao====================================");
????}
????
????private?SessionFactory?sessionFactory;
????public?void?setSessionFactory(SessionFactory?sessionFactory)?{
????????this.sessionFactory?=?sessionFactory;
????}
????
????/**獲取session,因?yàn)榘聞?wù)所以選用getCurrentSession()方法來獲取
?????*?@return
?????*/
????public?Session?getSession(){
????????return?this.sessionFactory.getCurrentSession();
????}
????
????public?List<Employee>?getAll()?{
????????String?hql?=?"FROM?Employee";???????
????????return?getSession().createQuery(hql).list();?????????
????}
}
//提問中有字?jǐn)?shù)限制所以在下面提問中補(bǔ)充相關(guān)配置文件代碼。。。。。。。。。。。。。。。。。。。。。。。。。。。
添加回答
舉報(bào)
0/150
提交
取消