第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

急求解test testqueryByIdWithSeckill 報(bào)錯(cuò) java.lang.NullPointerException的問題?

急求解test testqueryByIdWithSeckill 報(bào)錯(cuò) java.lang.NullPointerException的問題?

葉雪松 2017-03-27 22:27:15
三月 27, 2017 10:26:03 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getDefaultTestExecutionListenerClassNames信息: Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]三月 27, 2017 10:26:03 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper instantiateListeners信息: Could not instantiate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener]. Specify custom listener classes or make the default listener classes (and their required dependencies) available. Offending class: [org/springframework/web/context/request/RequestAttributes]三月 27, 2017 10:26:03 下午 org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners信息: Using TestExecutionListeners: [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@dbd940d, org.springframework.test.context.support.DirtiesContextTestExecutionListener@71d15f18, org.springframework.test.context.transaction.TransactionalTestExecutionListener@17695df3, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@6c9f5c0d]三月 27, 2017 10:26:04 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions信息: Loading XML bean definitions from class path resource [spring/spring-dao.xml]三月 27, 2017 10:26:07 下午 org.springframework.context.support.GenericApplicationContext prepareRefresh信息: Refreshing org.springframework.context.support.GenericApplicationContext@69b794e2: startup date [Mon Mar 27 22:26:07 CST 2017]; root of context hierarchy三月 27, 2017 10:26:07 下午 org.springframework.context.support.PropertySourcesPlaceholderConfigurer loadProperties信息: Loading properties file from class path resource [jdbc.properties]三月 27, 2017 10:26:07 下午 com.mchange.v2.log.MLog <clinit>信息: MLog clients using java 1.4+ standard logging.三月 27, 2017 10:26:07 下午 com.mchange.v2.c3p0.C3P0Registry banner信息: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]三月 27, 2017 10:26:08 下午 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 2, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 1000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1bop2qf9n4heyc112k2pnk|146dfe6, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1bop2qf9n4heyc112k2pnk|146dfe6, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]Mon Mar 27 22:26:08 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 Mar 27 22:26:08 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 Mar 27 22:26:08 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 Mar 27 22:26:09 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 Mar 27 22:26:09 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 Mar 27 22:26:09 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 Mar 27 22:26:09 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 Mar 27 22:26:09 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 Mar 27 22:26:09 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 Mar 27 22:26:09 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.seckill:null
查看完整描述

1 回答

?
葉雪松

TA貢獻(xiàn)3條經(jīng)驗(yàn) 獲得超1個(gè)贊


package org.seckill.dao;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.seckill.entity.SuccessKilled;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"classpath:spring/spring-dao.xml"})
public class SucessKilledDaoTest {
?? ?
?? ?@Autowired
?? ?private SuccessKilledDao successKilledDao;

?? ?@Test
?? ?public void testinsertSuccessKilledDao() {
?? ??? ?/*
?? ??? ? * 第一次執(zhí)行?? insertCount:1
?? ??? ? * 第二次執(zhí)行?? insertCount:0
?? ??? ? * 第三次執(zhí)行?? insertCount:0
?? ??? ? * 說明什么? 一個(gè)userid只可以秒殺一次,不可以重復(fù)秒殺QAQ
?? ??? ? */
?? ??? ?long itemid = 1000L;
?? ??? ?long userid = 2013002L;
?? ??? ?int insertCount = successKilledDao.insertSuccessKilled(itemid, userid);
?? ??? ?System.out.println("insertCount:" + insertCount);
?? ?}
?? ?
?? ?@Test
?? ?public void testqueryByIdWithSeckill() {
?? ??? ?long itemid = 1000L;
?? ??? ?long userid = 2013000L;
?? ??? ?SuccessKilled seckill = successKilledDao.queryByIdWithSeckill(itemid, userid);
?? ??? ?System.out.println("seckill:" + seckill);
?? ??? ?System.out.println("*********/n" + seckill.getSeckill());
?? ?}
}

查看完整回答
反對(duì) 回復(fù) 2017-03-27
  • 1 回答
  • 0 關(guān)注
  • 2688 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)