├── .gitattributes ├── IMOOCSpider ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── bean │ │ └── Imooc.class │ ├── main │ │ └── Main.class │ └── spider │ │ └── Spider.class ├── images │ └── result.png ├── readme.md └── src │ ├── bean │ └── Imooc.java │ ├── main │ └── Main.java │ └── spider │ └── Spider.java ├── JspChat ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ └── org.eclipse.wst.jsdt.ui.superType.name ├── WebContent │ ├── Exit.jsp │ ├── META-INF │ │ └── MANIFEST.MF │ ├── NewFile.jsp │ ├── Qqlogin.jsp │ ├── WEB-INF │ │ └── lib │ │ │ ├── jstl.jar │ │ │ ├── log4j-1.2.17.jar │ │ │ ├── mybatis-3.3.0.jar │ │ │ ├── ojdbc6.jar │ │ │ └── standard.jar │ ├── bottom.jsp │ ├── doUpload.jsp │ ├── document.jsp │ ├── documentList.jsp │ ├── forgetPassword.html │ ├── forgetPassword.jsp │ ├── images │ │ ├── 1.jpg │ │ ├── 10.jpg │ │ ├── 1dea3746938d019e28dbd2c4a1b1873f.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ ├── 4.jpg │ │ ├── 5.jpg │ │ ├── 6.jpg │ │ ├── 7.jpg │ │ ├── 8.jpg │ │ ├── 821118BE72BF3C3328E2D6AAB9446B03.png │ │ ├── 9.jpg │ │ ├── arrow - 副本 (4)(1).png │ │ ├── arrow - 副本.png │ │ ├── arrowleft.png │ │ ├── arrowright.png │ │ ├── arrowright2.png │ │ ├── bg1.jpg │ │ ├── bg2.jpg │ │ ├── bg3.jpg │ │ ├── bg4.jpg │ │ ├── bg5.jpg │ │ ├── botton.png │ │ ├── doc.png │ │ ├── doc1.png │ │ ├── document .png │ │ ├── document.jpg │ │ ├── document.png │ │ ├── documentMessage.png │ │ ├── f01.gif │ │ ├── f02.gif │ │ ├── f03.gif │ │ ├── f04.gif │ │ ├── fg.jpg │ │ ├── hudie.swf │ │ ├── image001.gif │ │ ├── login.jpg │ │ ├── music.mp3 │ │ ├── register.jpg │ │ ├── reset.jpg │ │ ├── small.png │ │ └── small1.png │ ├── left.jsp │ ├── login.jsp │ ├── main.jsp │ ├── register.html │ ├── register.jsp │ ├── resetPassword.html │ ├── resetPassword.jsp │ └── right.jsp ├── build │ └── classes │ │ ├── com │ │ └── hjy │ │ │ └── web │ │ │ └── servlet │ │ │ └── LoginServlet.class │ │ └── hjy │ │ └── Hjy.class └── src │ ├── com │ └── hjy │ │ └── web │ │ └── servlet │ │ └── LoginServlet.java │ └── hjy │ └── Hjy.java ├── Kaptcha ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ └── org.eclipse.wst.jsdt.ui.superType.name └── WebContent │ ├── META-INF │ └── MANIFEST.MF │ ├── WEB-INF │ ├── lib │ │ └── kaptcha-2.3.jar │ └── web.xml │ ├── check.jsp │ └── index.jsp ├── README.md ├── README_ZH.md ├── ServletAjax ├── .classpath ├── .mymetadata ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── WebRoot │ ├── META-INF │ │ └── MANIFEST.MF │ ├── WEB-INF │ │ ├── classes │ │ │ └── com │ │ │ │ └── hjy │ │ │ │ └── SearchServlet.class │ │ ├── lib │ │ │ ├── commons-beanutils-1.8.0.jar │ │ │ ├── commons-collections-3.2.1.jar │ │ │ ├── commons-lang-2.5.jar │ │ │ ├── commons-logging-1.1.1 (1).jar │ │ │ ├── commons-logging-1.1.1.jar │ │ │ ├── ezmorph-1.0.6.jar │ │ │ ├── json-lib-2.1-jdk13.jar │ │ │ └── jsoup-1.8.1.jar │ │ └── web.xml │ └── search.jsp ├── images │ └── result.png ├── readme.md └── src │ └── com │ └── hjy │ └── SearchServlet.java ├── _config.yml ├── checkcode ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ └── org.eclipse.wst.jsdt.ui.superType.name ├── README.md ├── WebContent │ ├── META-INF │ │ └── MANIFEST.MF │ ├── images │ │ └── image1.png │ └── index.jsp ├── build │ └── classes │ │ └── com │ │ └── servlet │ │ ├── ImageCodeServlet.class │ │ └── LoginServlet.class └── src │ └── com │ └── servlet │ ├── ImageCodeServlet.java │ └── LoginServlet.java ├── estore ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ └── org.eclipse.wst.jsdt.ui.superType.name ├── WebContent │ ├── META-INF │ │ └── MANIFEST.MF │ ├── WEB-INF │ │ ├── lib │ │ │ ├── jstl.jar │ │ │ ├── log4j-1.2.17.jar │ │ │ ├── mybatis-3.3.0.jar │ │ │ ├── ojdbc14.jar │ │ │ └── standard.jar │ │ └── web.xml │ ├── css │ │ └── main.css │ ├── footer.html │ ├── header.html │ ├── images │ │ ├── DV_getcode.asp │ │ ├── Female.gif │ │ ├── Forum_nav.gif │ │ ├── Male.gif │ │ ├── bg2.gif │ │ ├── bot_bg.gif │ │ ├── bottombg.gif │ │ ├── briup3.gif │ │ ├── buycar.gif │ │ ├── cancelone.gif │ │ ├── car_new.gif │ │ ├── cart.gif │ │ ├── cart_on.gif │ │ ├── carts_on.gif │ │ ├── courselist.gif │ │ ├── courselist_on.gif │ │ ├── dh_bg.gif │ │ ├── dog.gif │ │ ├── dvmenubg3.gif │ │ ├── exit.gif │ │ ├── exit_on.gif │ │ ├── index.gif │ │ ├── index_on.gif │ │ ├── logo.gif │ │ ├── navspacer.gif │ │ ├── next.gif │ │ ├── order.gif │ │ ├── order_on.gif │ │ ├── product │ │ │ ├── cover.gif │ │ │ ├── zcover.gif │ │ │ ├── zcover2.gif │ │ │ ├── zcover3.gif │ │ │ ├── zcover4.gif │ │ │ ├── zcover5.gif │ │ │ ├── zcover6.gif │ │ │ ├── zcover7.gif │ │ │ └── zcover8.gif │ │ ├── reg.gif │ │ ├── reg.psd │ │ ├── reg_on.gif │ │ ├── reg_on.psd │ │ ├── submit.gif │ │ ├── tabs_m_tile.gif │ │ ├── top_bg.gif │ │ └── top_r.gif │ ├── index.html │ ├── index.jsp │ ├── js │ │ └── main.js │ ├── login.html │ ├── login.jsp │ ├── order.html │ ├── productDetail.html │ ├── register.html │ ├── register.jsp │ ├── shopcart.html │ ├── shopcart.jsp │ └── user │ │ ├── confirmOrder.html │ │ ├── confirmOrder.jsp │ │ ├── footer.html │ │ ├── header.html │ │ ├── order.html │ │ ├── order.jsp │ │ ├── orderinfo.html │ │ └── userinfo.html ├── build │ └── classes │ │ ├── com │ │ └── briup │ │ │ ├── bean │ │ │ ├── Book.class │ │ │ ├── BookMapper.class │ │ │ ├── BookMapper.xml │ │ │ ├── Customer.class │ │ │ ├── CustomerMapper.class │ │ │ ├── CustomerMapper.xml │ │ │ ├── OrderLine.class │ │ │ ├── OrderLineMapper.class │ │ │ ├── OrderLineMapper.xml │ │ │ ├── Orderform.class │ │ │ ├── OrderformMapper.class │ │ │ ├── OrderformMapper.xml │ │ │ └── ShoppingCart.class │ │ │ ├── common │ │ │ ├── BeanFactory.class │ │ │ ├── MybatisSessionFactory.class │ │ │ └── exception │ │ │ │ ├── CustomerServiceException.class │ │ │ │ └── OrderServiceException.class │ │ │ ├── dao │ │ │ ├── ICustomerDao.class │ │ │ ├── IOrderDao.class │ │ │ └── impl │ │ │ │ ├── CustomerDaoImpl.class │ │ │ │ └── OrderDaoImpl.class │ │ │ ├── service │ │ │ ├── ICustomerService.class │ │ │ ├── IOrderService.class │ │ │ └── impl │ │ │ │ ├── CustomerServiceImpl.class │ │ │ │ └── OrderServiceImpl.class │ │ │ └── web │ │ │ ├── filter │ │ │ ├── AuthFilter.class │ │ │ └── EncodeFilter.class │ │ │ ├── listener │ │ │ ├── ContextListener.class │ │ │ └── SessionListener.class │ │ │ └── servlet │ │ │ ├── AddOrderLineServlet.class │ │ │ ├── LoginServlet.class │ │ │ ├── ModifiCartServlet.class │ │ │ ├── RegisterServlet.class │ │ │ ├── RemoveProductServlet.class │ │ │ └── SaveOrderServlet.class │ │ ├── log4j.properties │ │ └── mybatis-config.xml └── src │ ├── com │ └── briup │ │ ├── bean │ │ ├── Book.java │ │ ├── BookMapper.java │ │ ├── BookMapper.xml │ │ ├── Customer.java │ │ ├── CustomerMapper.java │ │ ├── CustomerMapper.xml │ │ ├── OrderLine.java │ │ ├── OrderLineMapper.java │ │ ├── OrderLineMapper.xml │ │ ├── Orderform.java │ │ ├── OrderformMapper.java │ │ ├── OrderformMapper.xml │ │ └── ShoppingCart.java │ │ ├── common │ │ ├── BeanFactory.java │ │ ├── MybatisSessionFactory.java │ │ └── exception │ │ │ ├── CustomerServiceException.java │ │ │ └── OrderServiceException.java │ │ ├── dao │ │ ├── ICustomerDao.java │ │ ├── IOrderDao.java │ │ └── impl │ │ │ ├── CustomerDaoImpl.java │ │ │ └── OrderDaoImpl.java │ │ ├── service │ │ ├── ICustomerService.java │ │ ├── IOrderService.java │ │ └── impl │ │ │ ├── CustomerServiceImpl.java │ │ │ └── OrderServiceImpl.java │ │ └── web │ │ ├── filter │ │ ├── AuthFilter.java │ │ └── EncodeFilter.java │ │ ├── listener │ │ ├── ContextListener.java │ │ └── SessionListener.java │ │ └── servlet │ │ ├── AddOrderLineServlet.java │ │ ├── LoginServlet.java │ │ ├── ModifiCartServlet.java │ │ ├── RegisterServlet.java │ │ ├── RemoveProductServlet.java │ │ └── SaveOrderServlet.java │ ├── log4j.properties │ └── mybatis-config.xml ├── seckill ├── .idea │ ├── artifacts │ │ ├── seckill_war.xml │ │ └── seckill_war_exploded.xml │ ├── compiler.xml │ ├── dataSources.local.xml │ ├── dataSources.xml │ ├── dataSources │ │ └── b4b375ab-fd9c-41ee-8e2e-ed911b5676d2.xml │ ├── kotlinc.xml │ ├── libraries │ │ ├── Maven__aopalliance_aopalliance_1_0.xml │ │ ├── Maven__c3p0_c3p0_0_9_1_2.xml │ │ ├── Maven__ch_qos_logback_logback_classic_1_1_1.xml │ │ ├── Maven__ch_qos_logback_logback_core_1_1_1.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_5_0.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_5_4.xml │ │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_5_4.xml │ │ ├── Maven__commons_logging_commons_logging_1_2.xml │ │ ├── Maven__javax_servlet_javax_servlet_api_3_1_0.xml │ │ ├── Maven__jstl_jstl_1_2.xml │ │ ├── Maven__junit_junit_4_11.xml │ │ ├── Maven__mysql_mysql_connector_java_5_1_35.xml │ │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ │ ├── Maven__org_mybatis_mybatis_3_3_0.xml │ │ ├── Maven__org_mybatis_mybatis_spring_1_2_3.xml │ │ ├── Maven__org_slf4j_slf4j_api_1_7_12.xml │ │ ├── Maven__org_springframework_spring_aop_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_beans_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_context_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_core_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_expression_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_jdbc_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_test_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_tx_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_web_4_1_7_RELEASE.xml │ │ ├── Maven__org_springframework_spring_webmvc_4_1_7_RELEASE.xml │ │ └── Maven__taglibs_standard_1_1_2.xml │ ├── misc.xml │ ├── modules.xml │ ├── sqldialects.xml │ └── workspace.xml ├── pom.xml ├── readme.md ├── seckill.iml ├── src │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── seckill │ │ │ │ ├── dao │ │ │ │ ├── SeckillDao.java │ │ │ │ └── SuccessKilledDao.java │ │ │ │ ├── dto │ │ │ │ ├── ExposerRsp.java │ │ │ │ ├── SeckillExecutionRsp.java │ │ │ │ └── SeckillResult.java │ │ │ │ ├── entity │ │ │ │ ├── Seckill.java │ │ │ │ └── SuccessKilled.java │ │ │ │ ├── enums │ │ │ │ └── SeckillStatEnum.java │ │ │ │ ├── exception │ │ │ │ ├── RepeatKillException.java │ │ │ │ ├── SeckillCloseException.java │ │ │ │ └── SeckillException.java │ │ │ │ ├── service │ │ │ │ ├── SeckillService.java │ │ │ │ └── impl │ │ │ │ │ └── SeckillServiceImpl.java │ │ │ │ └── web │ │ │ │ └── SeckillController.java │ │ ├── resources │ │ │ ├── jdbc.properties │ │ │ ├── logback.xml │ │ │ ├── mapper │ │ │ │ ├── SeckillDao.xml │ │ │ │ └── SuccesskilledDao.xml │ │ │ ├── mybatis-config.xml │ │ │ └── spring │ │ │ │ ├── spring-dao.xml │ │ │ │ ├── spring-service.xml │ │ │ │ └── spring-web.xml │ │ ├── sql │ │ │ └── schema.sql │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── jsp │ │ │ │ ├── common │ │ │ │ │ ├── head.jsp │ │ │ │ │ └── tag.jsp │ │ │ │ ├── css │ │ │ │ │ └── bootstrap.min.css │ │ │ │ ├── detail.jsp │ │ │ │ ├── js │ │ │ │ │ └── bootstrap.min.js │ │ │ │ └── list.jsp │ │ │ └── web.xml │ │ │ ├── index.jsp │ │ │ └── resources │ │ │ └── script │ │ │ └── seckill.js │ └── test │ │ └── java │ │ └── org │ │ └── seckill │ │ ├── dao │ │ ├── SeckillDaoTest.java │ │ └── SuccessKilledDaoTest.java │ │ └── service │ │ └── SeckillServiceTest.java └── target │ ├── classes │ ├── jdbc.properties │ ├── logback.xml │ ├── mapper │ │ ├── SeckillDao.xml │ │ └── SuccesskilledDao.xml │ ├── mybatis-config.xml │ ├── org │ │ └── seckill │ │ │ ├── dao │ │ │ ├── SeckillDao.class │ │ │ └── SuccessKilledDao.class │ │ │ ├── dto │ │ │ ├── ExposerRsp.class │ │ │ ├── SeckillExecutionRsp.class │ │ │ └── SeckillResult.class │ │ │ ├── entity │ │ │ ├── Seckill.class │ │ │ └── SuccessKilled.class │ │ │ ├── enums │ │ │ └── SeckillStatEnum.class │ │ │ ├── exception │ │ │ ├── RepeatKillException.class │ │ │ ├── SeckillCloseException.class │ │ │ └── SeckillException.class │ │ │ ├── service │ │ │ ├── SeckillService.class │ │ │ └── impl │ │ │ │ └── SeckillServiceImpl.class │ │ │ └── web │ │ │ └── SeckillController.class │ └── spring │ │ ├── spring-dao.xml │ │ ├── spring-service.xml │ │ └── spring-web.xml │ ├── seckill │ ├── META-INF │ │ └── MANIFEST.MF │ ├── WEB-INF │ │ ├── classes │ │ │ ├── jdbc.properties │ │ │ ├── logback.xml │ │ │ ├── mapper │ │ │ │ ├── SeckillDao.xml │ │ │ │ └── SuccesskilledDao.xml │ │ │ ├── mybatis-config.xml │ │ │ ├── org │ │ │ │ └── seckill │ │ │ │ │ ├── dao │ │ │ │ │ ├── SeckillDao.class │ │ │ │ │ └── SuccessKilledDao.class │ │ │ │ │ ├── dto │ │ │ │ │ ├── ExposerRsp.class │ │ │ │ │ ├── SeckillExecutionRsp.class │ │ │ │ │ └── SeckillResult.class │ │ │ │ │ ├── entity │ │ │ │ │ ├── Seckill.class │ │ │ │ │ └── SuccessKilled.class │ │ │ │ │ ├── enums │ │ │ │ │ └── SeckillStatEnum.class │ │ │ │ │ ├── exception │ │ │ │ │ ├── RepeatKillException.class │ │ │ │ │ ├── SeckillCloseException.class │ │ │ │ │ └── SeckillException.class │ │ │ │ │ ├── service │ │ │ │ │ ├── SeckillService.class │ │ │ │ │ └── impl │ │ │ │ │ │ └── SeckillServiceImpl.class │ │ │ │ │ └── web │ │ │ │ │ └── SeckillController.class │ │ │ └── spring │ │ │ │ ├── spring-dao.xml │ │ │ │ ├── spring-service.xml │ │ │ │ └── spring-web.xml │ │ ├── jsp │ │ │ ├── common │ │ │ │ ├── head.jsp │ │ │ │ └── tag.jsp │ │ │ ├── css │ │ │ │ └── bootstrap.min.css │ │ │ ├── detail.jsp │ │ │ ├── js │ │ │ │ └── bootstrap.min.js │ │ │ └── list.jsp │ │ ├── lib │ │ │ ├── aopalliance-1.0.jar │ │ │ ├── c3p0-0.9.1.2.jar │ │ │ ├── commons-logging-1.2.jar │ │ │ ├── jackson-annotations-2.5.0.jar │ │ │ ├── jackson-core-2.5.4.jar │ │ │ ├── jackson-databind-2.5.4.jar │ │ │ ├── javax.servlet-api-3.1.0.jar │ │ │ ├── jstl-1.2.jar │ │ │ ├── logback-classic-1.1.1.jar │ │ │ ├── logback-core-1.1.1.jar │ │ │ ├── mybatis-3.3.0.jar │ │ │ ├── mybatis-spring-1.2.3.jar │ │ │ ├── mysql-connector-java-5.1.35.jar │ │ │ ├── slf4j-api-1.7.12.jar │ │ │ ├── spring-aop-4.1.7.RELEASE.jar │ │ │ ├── spring-beans-4.1.7.RELEASE.jar │ │ │ ├── spring-context-4.1.7.RELEASE.jar │ │ │ ├── spring-core-4.1.7.RELEASE.jar │ │ │ ├── spring-expression-4.1.7.RELEASE.jar │ │ │ ├── spring-jdbc-4.1.7.RELEASE.jar │ │ │ ├── spring-test-4.1.7.RELEASE.jar │ │ │ ├── spring-tx-4.1.7.RELEASE.jar │ │ │ ├── spring-web-4.1.7.RELEASE.jar │ │ │ ├── spring-webmvc-4.1.7.RELEASE.jar │ │ │ └── standard-1.1.2.jar │ │ └── web.xml │ ├── index.jsp │ └── resources │ │ └── script │ │ └── seckill.js │ └── test-classes │ └── org │ └── seckill │ ├── dao │ ├── SeckillDaoTest.class │ └── SuccessKilledDaoTest.class │ └── service │ └── SeckillServiceTest.class ├── springboot-shiro ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml ├── readme.md └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── springboot │ │ │ └── demo │ │ │ ├── DemoApplication.java │ │ │ ├── common │ │ │ ├── auth │ │ │ │ ├── ShiroConfig.java │ │ │ │ └── ShiroRealm.java │ │ │ ├── config │ │ │ │ ├── MybatisPlusConfig.java │ │ │ │ ├── Swagger2.java │ │ │ │ └── generatir │ │ │ │ │ ├── App.java │ │ │ │ │ ├── CodeGenerator.java │ │ │ │ │ └── GeneratorUtils.java │ │ │ ├── domain │ │ │ │ ├── QueryRequest.java │ │ │ │ └── ResponseBo.java │ │ │ └── util │ │ │ │ └── MD5Utils.java │ │ │ └── sys │ │ │ ├── controller │ │ │ ├── LoginController.java │ │ │ ├── SessionController.java │ │ │ ├── SysMenuController.java │ │ │ ├── SysRoleController.java │ │ │ ├── SysRoleMenuController.java │ │ │ ├── SysUserController.java │ │ │ └── SysUserRoleController.java │ │ │ ├── entity │ │ │ ├── SysMenu.java │ │ │ ├── SysRole.java │ │ │ ├── SysRoleMenu.java │ │ │ ├── SysUser.java │ │ │ └── SysUserRole.java │ │ │ ├── mapper │ │ │ ├── SysMenuMapper.java │ │ │ ├── SysRoleMapper.java │ │ │ ├── SysRoleMenuMapper.java │ │ │ ├── SysUserMapper.java │ │ │ └── SysUserRoleMapper.java │ │ │ └── service │ │ │ ├── SysMenuService.java │ │ │ ├── SysRoleMenuService.java │ │ │ ├── SysRoleService.java │ │ │ ├── SysUserRoleService.java │ │ │ ├── SysUserService.java │ │ │ └── impl │ │ │ ├── SysMenuServiceImpl.java │ │ │ ├── SysRoleMenuServiceImpl.java │ │ │ ├── SysRoleServiceImpl.java │ │ │ ├── SysUserRoleServiceImpl.java │ │ │ └── SysUserServiceImpl.java │ └── resources │ │ ├── application.yml │ │ ├── db │ │ ├── data-mysql.sql │ │ └── schema-mysql.sql │ │ ├── mapper │ │ ├── SysMenuMapper.xml │ │ ├── SysRoleMapper.xml │ │ ├── SysRoleMenuMapper.xml │ │ ├── SysUserMapper.xml │ │ └── SysUserRoleMapper.xml │ │ ├── static │ │ ├── css │ │ │ └── login.css │ │ └── js │ │ │ └── jquery-1.11.1.min.js │ │ └── templates │ │ ├── index.html │ │ └── login.html │ └── test │ └── java │ └── com │ └── springboot │ └── demo │ └── DemoApplicationTests.java ├── tomcatServer3.0 ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── com │ │ └── hjy │ │ │ ├── GetPosyTest.class │ │ │ ├── request │ │ │ └── Request.class │ │ │ ├── response │ │ │ └── Response.class │ │ │ ├── server │ │ │ └── Server.class │ │ │ ├── serverThread │ │ │ └── ServerThread.class │ │ │ └── util │ │ │ └── GetParm.class │ └── source │ │ ├── 2.jpg │ │ ├── error.html │ │ ├── login.html │ │ ├── post.html │ │ ├── property.properties │ │ └── success.html ├── readme.md └── src │ ├── com │ └── hjy │ │ ├── GetPosyTest.java │ │ ├── request │ │ └── Request.java │ │ ├── response │ │ └── Response.java │ │ ├── server │ │ └── Server.java │ │ ├── serverThread │ │ └── ServerThread.java │ │ └── util │ │ └── GetParm.java │ └── source │ ├── 2.jpg │ ├── error.html │ ├── login.html │ ├── post.html │ ├── property.properties │ └── success.html └── woss ├── .classpath ├── .project ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.core.runtime.prefs └── org.eclipse.jdt.core.prefs ├── bin ├── com.zip ├── com │ └── briup │ │ ├── client │ │ ├── Client.class │ │ ├── Gather.class │ │ └── imp │ │ │ ├── ClientImp.class │ │ │ └── GatherImp.class │ │ ├── common │ │ ├── Backup.class │ │ ├── Configuration.class │ │ ├── ConfigurationAWare.class │ │ ├── DBUtils.class │ │ ├── Log.class │ │ ├── WossModule.class │ │ └── imp │ │ │ ├── BackupImp.class │ │ │ ├── ConfigurationImp.class │ │ │ └── LogImp.class │ │ ├── data │ │ ├── boss.sql │ │ └── radwtmp │ │ ├── main │ │ ├── ClientMain.class │ │ └── ServerMain.class │ │ ├── model │ │ └── BIDR.class │ │ └── server │ │ ├── DBStore.class │ │ ├── Server.class │ │ └── imp │ │ ├── DBStoreImp.class │ │ ├── ServerImp.class │ │ └── ServerThread.class ├── config.xml └── log4j.properties ├── jar ├── dom4j-1.6.1.jar ├── log4j-1.2.11.jar ├── ojdbc14.jar ├── ojdbc5.jar └── ojdbc6.jar ├── readme.md └── src ├── com └── briup │ ├── client │ ├── Client.java │ ├── Gather.java │ └── imp │ │ ├── ClientImp.java │ │ └── GatherImp.java │ ├── common │ ├── Backup.java │ ├── Configuration.java │ ├── ConfigurationAWare.java │ ├── DBUtils.java │ ├── Log.java │ ├── WossModule.java │ └── imp │ │ ├── BackupImp.java │ │ ├── ConfigurationImp.java │ │ └── LogImp.java │ ├── data │ ├── boss.sql │ └── radwtmp │ ├── main │ ├── ClientMain.java │ └── ServerMain.java │ ├── model │ └── BIDR.java │ └── server │ ├── DBStore.java │ ├── Server.java │ └── imp │ ├── DBStoreImp.java │ ├── ServerImp.java │ └── ServerThread.java ├── config.xml └── log4j.properties /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java -------------------------------------------------------------------------------- /IMOOCSpider/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /IMOOCSpider/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | IMOOCSpider 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /IMOOCSpider/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.8 12 | -------------------------------------------------------------------------------- /IMOOCSpider/bin/bean/Imooc.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/IMOOCSpider/bin/bean/Imooc.class -------------------------------------------------------------------------------- /IMOOCSpider/bin/main/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/IMOOCSpider/bin/main/Main.class -------------------------------------------------------------------------------- /IMOOCSpider/bin/spider/Spider.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/IMOOCSpider/bin/spider/Spider.class -------------------------------------------------------------------------------- /IMOOCSpider/images/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/IMOOCSpider/images/result.png -------------------------------------------------------------------------------- /IMOOCSpider/readme.md: -------------------------------------------------------------------------------- 1 | # java 简易实现网络爬虫 2 | 3 | ### 什么是网络爬虫? 4 | #### 维基百科 5 | >**[网络爬虫](https://zh.wikipedia.org/wiki/%E7%B6%B2%E8%B7%AF%E7%88%AC%E8%9F%B2)**(英语:**web crawler**),也叫网络蜘蛛(spider),是一种用来自动浏览万维网的网络机器人。其目的一般为编纂网络索引。 6 | 7 | #### 百度百科 8 | >**网络爬虫**(又被称为网页蜘蛛,网络机器人,在FOAF社区中间,更经常的称为网页追逐者),是一种按照一定的规则,自动地抓取万维网信息的程序或者脚本。另外一些不常使用的名字还有蚂蚁、自动索引、模拟程序或者蠕虫。 9 | 10 | ### java网络爬虫练习项目 11 | 一个比较简单的java练习项目。 12 | #### 需要知识 13 | * 什么是网络爬虫 14 | * Java基础 15 | * 正则表达式 16 | 17 | #### 项目思路 18 | 在[慕课网](http://www.imooc.com/wenda)的猿问页面,寻找一个你喜欢的问题页面,利用http请求获取问题页面的源码,然后通过正则表达式,不断爬取相关问题页面。 19 | 20 | #### 项目介绍 21 | 该项目存在三个类 22 | `Imooc.java :` `imooc问题bean类` 23 | `Spider.java:` `封装用来爬取页面的方法类` 24 | `Main.java:` `运行起始页面` 25 | 26 | * Imooc.java类是要爬取内容的对象类,属性成员有问题,问题链接,问题描述,答案列表和下一个问题链接。 27 | * Spider.java类封装了2个可能用到的方法,getSource方法获取网页源代码和getImoocPage获取页面Url列表。 28 | 29 | #### 项目源码 30 | IMOOCSpider项目已上传到我的github上----[传送门](https://github.com/HelloWorld521/Java.git) 31 | 欢迎Star 32 | 33 | 下载下来后导入eclipse即可运行。 34 | 35 | #### 项目运行结果 36 | 37 | ![结果.png](./images/result.png) 38 | -------------------------------------------------------------------------------- /IMOOCSpider/src/main/Main.java: -------------------------------------------------------------------------------- 1 | package main; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import bean.Imooc; 7 | 8 | public class Main { 9 | 10 | public static void main(String[] args) { 11 | String url = "http://www.imooc.com/wenda/detail/345252"; 12 | // List imoocs = new ArrayList(); 13 | Imooc imooc; 14 | // 限定爬取数量 15 | for(int i=0; i<5;i++){ 16 | imooc = new Imooc(url); 17 | // imoocs.add(imooc); 18 | url = imooc.nextUrl; 19 | System.out.println(imooc); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /JspChat/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | JspChat 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.wst.common.project.facet.core.nature 33 | org.eclipse.jdt.core.javanature 34 | org.eclipse.wst.jsdt.core.jsNature 35 | 36 | 37 | -------------------------------------------------------------------------------- /JspChat/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JspChat/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /JspChat/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JspChat/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /JspChat/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /JspChat/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /JspChat/WebContent/Exit.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8" import="java.util.*"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | <% 11 | //取得登录的用户名 12 | String username = (String) session.getAttribute("user"); 13 | //销毁session 14 | session.invalidate(); 15 | // 从在线列表中删除用户名 16 | List onlineUserList = (List) application.getAttribute("onlineUserList"); 17 | onlineUserList.remove(username); 18 | application.setAttribute("onlineUserList",onlineUserList); 19 | response.sendRedirect("login.jsp"); 20 | %> 21 | 22 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /JspChat/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /JspChat/WebContent/WEB-INF/lib/jstl.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/WEB-INF/lib/jstl.jar -------------------------------------------------------------------------------- /JspChat/WebContent/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /JspChat/WebContent/WEB-INF/lib/mybatis-3.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/WEB-INF/lib/mybatis-3.3.0.jar -------------------------------------------------------------------------------- /JspChat/WebContent/WEB-INF/lib/ojdbc6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/WEB-INF/lib/ojdbc6.jar -------------------------------------------------------------------------------- /JspChat/WebContent/WEB-INF/lib/standard.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/WEB-INF/lib/standard.jar -------------------------------------------------------------------------------- /JspChat/WebContent/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/1.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/10.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/1dea3746938d019e28dbd2c4a1b1873f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/1dea3746938d019e28dbd2c4a1b1873f.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/2.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/3.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/4.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/5.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/6.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/7.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/8.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/821118BE72BF3C3328E2D6AAB9446B03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/821118BE72BF3C3328E2D6AAB9446B03.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/9.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/arrow - 副本 (4)(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/arrow - 副本 (4)(1).png -------------------------------------------------------------------------------- /JspChat/WebContent/images/arrow - 副本.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/arrow - 副本.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/arrowleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/arrowleft.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/arrowright.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/arrowright2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/arrowright2.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/bg1.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/bg2.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/bg3.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/bg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/bg4.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/bg5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/bg5.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/botton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/botton.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/doc.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/doc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/doc1.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/document .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/document .png -------------------------------------------------------------------------------- /JspChat/WebContent/images/document.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/document.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/document.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/documentMessage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/documentMessage.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/f01.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/f01.gif -------------------------------------------------------------------------------- /JspChat/WebContent/images/f02.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/f02.gif -------------------------------------------------------------------------------- /JspChat/WebContent/images/f03.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/f03.gif -------------------------------------------------------------------------------- /JspChat/WebContent/images/f04.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/f04.gif -------------------------------------------------------------------------------- /JspChat/WebContent/images/fg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/fg.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/hudie.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/hudie.swf -------------------------------------------------------------------------------- /JspChat/WebContent/images/image001.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/image001.gif -------------------------------------------------------------------------------- /JspChat/WebContent/images/login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/login.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/music.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/music.mp3 -------------------------------------------------------------------------------- /JspChat/WebContent/images/register.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/register.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/reset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/reset.jpg -------------------------------------------------------------------------------- /JspChat/WebContent/images/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/small.png -------------------------------------------------------------------------------- /JspChat/WebContent/images/small1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/images/small1.png -------------------------------------------------------------------------------- /JspChat/WebContent/main.jsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/WebContent/main.jsp -------------------------------------------------------------------------------- /JspChat/build/classes/com/hjy/web/servlet/LoginServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/build/classes/com/hjy/web/servlet/LoginServlet.class -------------------------------------------------------------------------------- /JspChat/build/classes/hjy/Hjy.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/JspChat/build/classes/hjy/Hjy.class -------------------------------------------------------------------------------- /JspChat/src/com/hjy/web/servlet/LoginServlet.java: -------------------------------------------------------------------------------- 1 | package com.hjy.web.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.annotation.WebServlet; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | @WebServlet("/LoginServlet") 11 | public class LoginServlet extends HttpServlet { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public LoginServlet() { 15 | super(); 16 | } 17 | 18 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 19 | response.getWriter().append("Served at: ").append(request.getContextPath()); 20 | } 21 | 22 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 23 | doGet(request, response); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Kaptcha/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Kaptcha/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Kaptcha 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.wst.common.project.facet.core.nature 33 | org.eclipse.jdt.core.javanature 34 | org.eclipse.wst.jsdt.core.jsNature 35 | 36 | 37 | -------------------------------------------------------------------------------- /Kaptcha/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Kaptcha/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /Kaptcha/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Kaptcha/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Kaptcha/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /Kaptcha/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /Kaptcha/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /Kaptcha/WebContent/WEB-INF/lib/kaptcha-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/Kaptcha/WebContent/WEB-INF/lib/kaptcha-2.3.jar -------------------------------------------------------------------------------- /Kaptcha/WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Kaptcha 4 | 5 | index.html 6 | index.htm 7 | index.jsp 8 | 9 | 10 | Kaptcha 11 | com.google.code.kaptcha.servlet.KaptchaServlet 12 | 13 | 14 | Kaptcha 15 | /randomcode.jpg 16 | 17 | -------------------------------------------------------------------------------- /Kaptcha/WebContent/check.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 11 | <% 12 | //校验 13 | String code =(String)session.getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY); 14 | String str = request.getParameter("code"); 15 | if(code.equals(str)){ 16 | out.println("true"); 17 | out.println(code+"----"+str); 18 | } 19 | 20 | %> 21 | 22 | -------------------------------------------------------------------------------- /Kaptcha/WebContent/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 |
11 | 12 | 验证码 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Java 2 | 3 | ##### [中文](README_ZH.md) 4 | 5 | ## Project Descriptions 6 | 7 | Below here are some of my java project exercise codes, I would like to share it with everyone, hope that we are able to improve with everyone! 8 | 9 | ## Java Projects 10 | 11 | * [swagger2-boot-starter](https://github.com/HelloWorld521/swagger2-boot-starter) 12 | 13 | * [SpringBoot-Shiro](./springboot-shiro/) 14 | 15 | * [SECKILL](./seckill/) 16 | 17 | * [Woss2.0 ](./woss/) 18 | 19 | * [tomcatServlet3.0 Web Server](./tomcatServer3.0/) 20 | 21 | * [ServletAjax ](./ServletAjax/) 22 | 23 | * [JspChat jsp Chatroom](./JspChat/) 24 | 25 | * [eStore library system](./estore/) 26 | 27 | * [checkcode Java captcha code generator](./checkcode/) 28 | 29 | * [IMOOCSpider easy internet spider](./IMOOCSpider/) 30 | 31 | ## Last 32 | 33 | If any of the projects above is able to help you out, please do click on "Star" on top right-hand-site. Thank you! 34 | -------------------------------------------------------------------------------- /README_ZH.md: -------------------------------------------------------------------------------- 1 | # Java 2 | 3 | ##### [Enlish](README.md) 4 | 5 | ## 项目介绍 6 | 7 | 本项目是个人的一些java项目练习源码,分享给大家,希望可以和大家一起进步! 8 | 9 | 10 | ## Java项目实例 11 | 12 | * [swagger2-boot-starter](https://github.com/HelloWorld521/swagger2-boot-starter) 13 | 14 | * [SpringBoot-Shiro](./springboot-shiro/) 15 | 16 | * [秒杀业务](./seckill/) 17 | 18 | * [Woss2.0 电信采集系统](./woss/) 19 | 20 | * [tomcatServlet3.0 Web 服务器](./tomcatServer3.0/) 21 | 22 | * [ServletAjax 原生 js 实现搜索框智能提示](./ServletAjax/) 23 | 24 | * [JspChat jsp 聊天室](./JspChat/) 25 | 26 | * [eStore 图书管理系统](./estore/) 27 | 28 | * [checkcode Java 制作验证码](./checkcode/) 29 | 30 | * [IMOOCSpider 简易网络爬虫](./IMOOCSpider/) 31 | 32 | 33 | ## 最后   34 | 如果帮助到你,请点击右上角 "star",谢谢! -------------------------------------------------------------------------------- /ServletAjax/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ServletAjax/.mymetadata: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ServletAjax/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Tue Mar 28 14:21:09 CST 2017 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.5 8 | -------------------------------------------------------------------------------- /ServletAjax/WebRoot/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/classes/com/hjy/SearchServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/classes/com/hjy/SearchServlet.class -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/commons-beanutils-1.8.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/commons-beanutils-1.8.0.jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/commons-collections-3.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/commons-collections-3.2.1.jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/commons-lang-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/commons-lang-2.5.jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/commons-logging-1.1.1 (1).jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/commons-logging-1.1.1 (1).jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/ezmorph-1.0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/ezmorph-1.0.6.jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/json-lib-2.1-jdk13.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/json-lib-2.1-jdk13.jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/lib/jsoup-1.8.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/WebRoot/WEB-INF/lib/jsoup-1.8.1.jar -------------------------------------------------------------------------------- /ServletAjax/WebRoot/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | search.jsp 9 | 10 | 11 | search 12 | com.hjy.SearchServlet 13 | 14 | 15 | search 16 | /search 17 | 18 | 19 | -------------------------------------------------------------------------------- /ServletAjax/images/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/images/result.png -------------------------------------------------------------------------------- /ServletAjax/readme.md: -------------------------------------------------------------------------------- 1 | # 原生 AJAX 实现搜索框智能提示 2 | ## 本项目介绍 3 | 4 | ### 应用场景 5 | 搜索框,模糊搜索等 6 | 7 | ### 执行结果 8 | ![效果图][1] 9 | 10 | ### 理论分析 11 | 12 | 1. 在搜索框输入关键字 13 | 2. 浏览器将关键字「异步」发送给服务器 14 | 3. 服务器经过处理。将相应数据以 Json 格式返回客户端 15 | 4. 浏览器接受服务器响应数据,解析之后使用 js 操作 dom 显示数据。 16 | 17 | 18 | 重点一:数据交互采用 ajax 方式 19 | 重点二:javascript 解析数据动态展示 20 | 21 | ### XMLHttpRequest介绍 22 | 23 | XMLHttpRequest 是一个API, 它为客户端提供了在客户端和服务器之间传输数据的功能 24 | 25 | readyState 五种状态: 26 | 27 | 值 | 状态 | 描述 28 | -- | --- | ---- 29 | 0 | UNSENT (未打开) | 代理被创建,但尚未调用 open() 方法。 30 | 1 | OPENED (未发送) | open() 方法已经被调用。 31 | 2 | HEADERS_RECEIVED (已获取响应头) | send() 方法已经被调用,并且头部和状态已经可获得。 32 | 3 | LOADING (正在下载响应体) | 下载中,responseText 属性已经包含部分数据。 33 | 4 | DONE (请求完成) | 下载操作已完成。 34 | 35 | 36 | 37 | ### 项目核心源码 38 | 见本项目 39 | 40 | 41 | [1]: ./images/result.png 42 | -------------------------------------------------------------------------------- /ServletAjax/src/com/hjy/SearchServlet.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/ServletAjax/src/com/hjy/SearchServlet.java -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /checkcode/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /checkcode/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | checkcode 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.wst.common.project.facet.core.nature 33 | org.eclipse.jdt.core.javanature 34 | org.eclipse.wst.jsdt.core.jsNature 35 | 36 | 37 | -------------------------------------------------------------------------------- /checkcode/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /checkcode/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /checkcode/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /checkcode/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /checkcode/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /checkcode/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /checkcode/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## 介绍 3 | 本项目是观看慕课java实现验证码制作课程所写,慕课视频----[传送门](http://www.imooc.com/learn/283) 4 | 5 | 欢迎和同学们互相交流 6 | 7 | ## 详细代码 8 | 见仓库 9 | 10 | ## 成果演示 11 | 12 | ![index.jsp页面](WebContent/images/image1.png) 13 | 14 | ## 推荐链接 15 | [codinghjy's blog](http://codinghjy.coding.me/) 16 | -------------------------------------------------------------------------------- /checkcode/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /checkcode/WebContent/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/checkcode/WebContent/images/image1.png -------------------------------------------------------------------------------- /checkcode/WebContent/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" 2 | pageEncoding="utf-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 16 | 17 | 18 |
19 | 验证码: 20 | 验证码 21 | 看不清楚 22 | 23 |
24 | 25 | -------------------------------------------------------------------------------- /checkcode/build/classes/com/servlet/ImageCodeServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/checkcode/build/classes/com/servlet/ImageCodeServlet.class -------------------------------------------------------------------------------- /checkcode/build/classes/com/servlet/LoginServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/checkcode/build/classes/com/servlet/LoginServlet.class -------------------------------------------------------------------------------- /checkcode/src/com/servlet/LoginServlet.java: -------------------------------------------------------------------------------- 1 | package com.servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.annotation.WebServlet; 8 | import javax.servlet.http.HttpServlet; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | 12 | @WebServlet("/servlet/LoginServlet") 13 | public class LoginServlet extends HttpServlet{ 14 | 15 | @Override 16 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 17 | String codes = req.getSession().getAttribute("codes").toString(); 18 | String mycode = req.getParameter("checkcode"); 19 | resp.setCharacterEncoding("utf-8"); 20 | 21 | PrintWriter out = resp.getWriter(); 22 | if(mycode.toUpperCase().equals(codes)){ 23 | out.println("验证码输入正确!"); 24 | }else{ 25 | out.println("验证码输入错误!"); 26 | } 27 | out.flush(); 28 | out.close(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /estore/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /estore/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | estore 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.wst.common.project.facet.core.nature 33 | org.eclipse.jdt.core.javanature 34 | org.eclipse.wst.jsdt.core.jsNature 35 | 36 | 37 | -------------------------------------------------------------------------------- /estore/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /estore/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//WebContent/index.jsp=UTF-8 3 | encoding//src/com/briup/service/ICustomerService.java=UTF-8 4 | encoding//src/com/briup/service/impl/CustomerServiceImpl.java=UTF-8 5 | encoding/=UTF-8 6 | -------------------------------------------------------------------------------- /estore/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /estore/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /estore/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /estore/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /estore/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /estore/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /estore/WebContent/WEB-INF/lib/jstl.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/WEB-INF/lib/jstl.jar -------------------------------------------------------------------------------- /estore/WebContent/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /estore/WebContent/WEB-INF/lib/mybatis-3.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/WEB-INF/lib/mybatis-3.3.0.jar -------------------------------------------------------------------------------- /estore/WebContent/WEB-INF/lib/ojdbc14.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/WEB-INF/lib/ojdbc14.jar -------------------------------------------------------------------------------- /estore/WebContent/WEB-INF/lib/standard.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/WEB-INF/lib/standard.jar -------------------------------------------------------------------------------- /estore/WebContent/css/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/css/main.css -------------------------------------------------------------------------------- /estore/WebContent/images/DV_getcode.asp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/DV_getcode.asp -------------------------------------------------------------------------------- /estore/WebContent/images/Female.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/Female.gif -------------------------------------------------------------------------------- /estore/WebContent/images/Forum_nav.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/Forum_nav.gif -------------------------------------------------------------------------------- /estore/WebContent/images/Male.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/Male.gif -------------------------------------------------------------------------------- /estore/WebContent/images/bg2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/bg2.gif -------------------------------------------------------------------------------- /estore/WebContent/images/bot_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/bot_bg.gif -------------------------------------------------------------------------------- /estore/WebContent/images/bottombg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/bottombg.gif -------------------------------------------------------------------------------- /estore/WebContent/images/briup3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/briup3.gif -------------------------------------------------------------------------------- /estore/WebContent/images/buycar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/buycar.gif -------------------------------------------------------------------------------- /estore/WebContent/images/cancelone.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/cancelone.gif -------------------------------------------------------------------------------- /estore/WebContent/images/car_new.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/car_new.gif -------------------------------------------------------------------------------- /estore/WebContent/images/cart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/cart.gif -------------------------------------------------------------------------------- /estore/WebContent/images/cart_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/cart_on.gif -------------------------------------------------------------------------------- /estore/WebContent/images/carts_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/carts_on.gif -------------------------------------------------------------------------------- /estore/WebContent/images/courselist.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/courselist.gif -------------------------------------------------------------------------------- /estore/WebContent/images/courselist_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/courselist_on.gif -------------------------------------------------------------------------------- /estore/WebContent/images/dh_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/dh_bg.gif -------------------------------------------------------------------------------- /estore/WebContent/images/dog.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/dog.gif -------------------------------------------------------------------------------- /estore/WebContent/images/dvmenubg3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/dvmenubg3.gif -------------------------------------------------------------------------------- /estore/WebContent/images/exit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/exit.gif -------------------------------------------------------------------------------- /estore/WebContent/images/exit_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/exit_on.gif -------------------------------------------------------------------------------- /estore/WebContent/images/index.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/index.gif -------------------------------------------------------------------------------- /estore/WebContent/images/index_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/index_on.gif -------------------------------------------------------------------------------- /estore/WebContent/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/logo.gif -------------------------------------------------------------------------------- /estore/WebContent/images/navspacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/navspacer.gif -------------------------------------------------------------------------------- /estore/WebContent/images/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/next.gif -------------------------------------------------------------------------------- /estore/WebContent/images/order.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/order.gif -------------------------------------------------------------------------------- /estore/WebContent/images/order_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/order_on.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/cover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/cover.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover2.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover3.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover4.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover5.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover6.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover7.gif -------------------------------------------------------------------------------- /estore/WebContent/images/product/zcover8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/product/zcover8.gif -------------------------------------------------------------------------------- /estore/WebContent/images/reg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/reg.gif -------------------------------------------------------------------------------- /estore/WebContent/images/reg.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/reg.psd -------------------------------------------------------------------------------- /estore/WebContent/images/reg_on.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/reg_on.gif -------------------------------------------------------------------------------- /estore/WebContent/images/reg_on.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/reg_on.psd -------------------------------------------------------------------------------- /estore/WebContent/images/submit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/submit.gif -------------------------------------------------------------------------------- /estore/WebContent/images/tabs_m_tile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/tabs_m_tile.gif -------------------------------------------------------------------------------- /estore/WebContent/images/top_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/top_bg.gif -------------------------------------------------------------------------------- /estore/WebContent/images/top_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/WebContent/images/top_r.gif -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/Book.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/Book.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/BookMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/BookMapper.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/BookMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/Customer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/Customer.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/CustomerMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/CustomerMapper.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/CustomerMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | select customer_seq.nextval from dual 12 | 13 | insert into customer values(#{id},#{name},#{password},#{zip},#{address},#{telephone},#{email}) 14 | 15 | -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/OrderLine.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/OrderLine.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/OrderLineMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/OrderLineMapper.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/OrderLineMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | select orderline_seq.nextval from dual 8 | 9 | insert into orderline values(#{id},#{num},#{order.id},#{book.id}) 10 | 11 | -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/Orderform.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/Orderform.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/OrderformMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/OrderformMapper.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/OrderformMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | select orderform_seq.nextval from dual 9 | 10 | insert into orderform values(#{id},#{cost},#{orderDate},#{cust.id}) 11 | 12 | -------------------------------------------------------------------------------- /estore/build/classes/com/briup/bean/ShoppingCart.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/bean/ShoppingCart.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/common/BeanFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/common/BeanFactory.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/common/MybatisSessionFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/common/MybatisSessionFactory.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/common/exception/CustomerServiceException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/common/exception/CustomerServiceException.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/common/exception/OrderServiceException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/common/exception/OrderServiceException.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/dao/ICustomerDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/dao/ICustomerDao.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/dao/IOrderDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/dao/IOrderDao.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/dao/impl/CustomerDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/dao/impl/CustomerDaoImpl.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/dao/impl/OrderDaoImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/dao/impl/OrderDaoImpl.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/service/ICustomerService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/service/ICustomerService.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/service/IOrderService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/service/IOrderService.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/service/impl/CustomerServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/service/impl/CustomerServiceImpl.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/service/impl/OrderServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/service/impl/OrderServiceImpl.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/filter/AuthFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/filter/AuthFilter.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/filter/EncodeFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/filter/EncodeFilter.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/listener/ContextListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/listener/ContextListener.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/listener/SessionListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/listener/SessionListener.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/servlet/AddOrderLineServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/servlet/AddOrderLineServlet.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/servlet/LoginServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/servlet/LoginServlet.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/servlet/ModifiCartServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/servlet/ModifiCartServlet.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/servlet/RegisterServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/servlet/RegisterServlet.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/servlet/RemoveProductServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/servlet/RemoveProductServlet.class -------------------------------------------------------------------------------- /estore/build/classes/com/briup/web/servlet/SaveOrderServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/estore/build/classes/com/briup/web/servlet/SaveOrderServlet.class -------------------------------------------------------------------------------- /estore/build/classes/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d [%-5p] %c - %m%n 5 | #show sql 6 | log4j.logger.java.sql.ResultSet=INFO 7 | log4j.logger.org.apache=INFO 8 | log4j.logger.java.sql.Connection=DEBUG 9 | log4j.logger.java.sql.Statement=DEBUG 10 | log4j.logger.java.sql.PreparedStatement=DEBUG -------------------------------------------------------------------------------- /estore/src/com/briup/bean/Book.java: -------------------------------------------------------------------------------- 1 | package com.briup.bean; 2 | 3 | import java.io.Serializable; 4 | import java.util.HashSet; 5 | import java.util.Set; 6 | 7 | public class Book implements Serializable{ 8 | 9 | private Long id; 10 | private String name; 11 | private Double price; 12 | private Set orderLines = new HashSet(); 13 | 14 | public Long getId() { 15 | return id; 16 | } 17 | public void setId(Long id) { 18 | this.id = id; 19 | } 20 | public String getName() { 21 | return name; 22 | } 23 | public void setName(String name) { 24 | this.name = name; 25 | } 26 | public Double getPrice() { 27 | return price; 28 | } 29 | public void setPrice(Double price) { 30 | this.price = price; 31 | } 32 | public Set getOrderLines() { 33 | return orderLines; 34 | } 35 | public void setOrderLines(Set orderLines) { 36 | this.orderLines = orderLines; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/BookMapper.java: -------------------------------------------------------------------------------- 1 | package com.briup.bean; 2 | 3 | import java.util.List; 4 | 5 | public interface BookMapper { 6 | List selectBooks(); 7 | } 8 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/BookMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/CustomerMapper.java: -------------------------------------------------------------------------------- 1 | package com.briup.bean; 2 | 3 | public interface CustomerMapper { 4 | void insertCustomer(Customer c); 5 | Customer selectCustomerByName(String name); 6 | } 7 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/CustomerMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | select customer_seq.nextval from dual 12 | 13 | insert into customer values(#{id},#{name},#{password},#{zip},#{address},#{telephone},#{email}) 14 | 15 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/OrderLine.java: -------------------------------------------------------------------------------- 1 | package com.briup.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class OrderLine implements Serializable{ 6 | 7 | private Long id; 8 | private Long num; 9 | //与book的关系 多对一 10 | private Book book; 11 | //与orderform的关系 多对一 12 | private Orderform order; 13 | public Long getId() { 14 | return id; 15 | } 16 | public void setId(Long id) { 17 | this.id = id; 18 | } 19 | public Long getNum() { 20 | return num; 21 | } 22 | public void setNum(Long num) { 23 | this.num = num; 24 | } 25 | public Book getBook() { 26 | return book; 27 | } 28 | public void setBook(Book book) { 29 | this.book = book; 30 | } 31 | public Orderform getOrderform() { 32 | return order; 33 | } 34 | public void setOrderform(Orderform order) { 35 | this.order = order; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/OrderLineMapper.java: -------------------------------------------------------------------------------- 1 | package com.briup.bean; 2 | 3 | public interface OrderLineMapper { 4 | void insertOrderline(OrderLine line); 5 | } 6 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/OrderLineMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | select orderline_seq.nextval from dual 8 | 9 | insert into orderline values(#{id},#{num},#{order.id},#{book.id}) 10 | 11 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/OrderformMapper.java: -------------------------------------------------------------------------------- 1 | package com.briup.bean; 2 | 3 | public interface OrderformMapper { 4 | void insertOrderform(Orderform o); 5 | } 6 | -------------------------------------------------------------------------------- /estore/src/com/briup/bean/OrderformMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | select orderform_seq.nextval from dual 9 | 10 | insert into orderform values(#{id},#{cost},#{orderDate},#{cust.id}) 11 | 12 | -------------------------------------------------------------------------------- /estore/src/com/briup/common/exception/CustomerServiceException.java: -------------------------------------------------------------------------------- 1 | package com.briup.common.exception; 2 | 3 | public class CustomerServiceException extends Exception { 4 | 5 | public CustomerServiceException() { 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public CustomerServiceException(String arg0) { 10 | super(arg0); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public CustomerServiceException(Throwable arg0) { 15 | super(arg0); 16 | // TODO Auto-generated constructor stub 17 | } 18 | 19 | public CustomerServiceException(String arg0, Throwable arg1) { 20 | super(arg0, arg1); 21 | // TODO Auto-generated constructor stub 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /estore/src/com/briup/common/exception/OrderServiceException.java: -------------------------------------------------------------------------------- 1 | package com.briup.common.exception; 2 | 3 | public class OrderServiceException extends Exception { 4 | 5 | public OrderServiceException() { 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public OrderServiceException(String message) { 10 | super(message); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public OrderServiceException(Throwable cause) { 15 | super(cause); 16 | // TODO Auto-generated constructor stub 17 | } 18 | 19 | public OrderServiceException(String message, Throwable cause) { 20 | super(message, cause); 21 | // TODO Auto-generated constructor stub 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /estore/src/com/briup/dao/ICustomerDao.java: -------------------------------------------------------------------------------- 1 | package com.briup.dao; 2 | 3 | import com.briup.bean.Customer; 4 | 5 | public interface ICustomerDao { 6 | //保存用户 7 | void saveCustomer(Customer customer) throws Exception; 8 | //更新用户 9 | void updateCustomer(Customer customer); 10 | //查找用户 11 | Customer findCustomerByName(String name) throws Exception; 12 | } 13 | -------------------------------------------------------------------------------- /estore/src/com/briup/dao/IOrderDao.java: -------------------------------------------------------------------------------- 1 | package com.briup.dao; 2 | 3 | import java.util.Map; 4 | 5 | import com.briup.bean.Book; 6 | import com.briup.bean.OrderLine; 7 | import com.briup.bean.Orderform; 8 | 9 | public interface IOrderDao { 10 | //保存订单 11 | void saveOrder(Orderform order) throws Exception; 12 | //删除订单 13 | void deleteOrder(Long orderid) throws Exception; 14 | //查找用户所有订单 15 | Map findAllOrder(Long customerid) throws Exception; 16 | //查找单个订单 17 | Orderform findOrderById(Long orderid) throws Exception; 18 | //查找所有书籍 19 | Map findAllBook() throws Exception; 20 | 21 | void saveOrderLine(OrderLine line); 22 | } 23 | -------------------------------------------------------------------------------- /estore/src/com/briup/dao/impl/CustomerDaoImpl.java: -------------------------------------------------------------------------------- 1 | package com.briup.dao.impl; 2 | 3 | import org.apache.ibatis.session.SqlSession; 4 | 5 | import com.briup.bean.Customer; 6 | import com.briup.bean.CustomerMapper; 7 | import com.briup.common.MybatisSessionFactory; 8 | import com.briup.dao.ICustomerDao; 9 | 10 | public class CustomerDaoImpl 11 | implements ICustomerDao{ 12 | 13 | @Override 14 | public void saveCustomer(Customer customer) throws Exception { 15 | SqlSession session = MybatisSessionFactory.getSession(); 16 | CustomerMapper cm = 17 | session.getMapper(CustomerMapper.class); 18 | cm.insertCustomer(customer); 19 | } 20 | 21 | @Override 22 | public void updateCustomer(Customer customer) { 23 | } 24 | 25 | @Override 26 | public Customer findCustomerByName(String name) throws Exception { 27 | SqlSession session = MybatisSessionFactory.getSession(); 28 | CustomerMapper cm = 29 | session.getMapper(CustomerMapper.class); 30 | return cm.selectCustomerByName(name); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /estore/src/com/briup/service/ICustomerService.java: -------------------------------------------------------------------------------- 1 | package com.briup.service; 2 | 3 | import com.briup.bean.Customer; 4 | import com.briup.common.exception.CustomerServiceException; 5 | 6 | public interface ICustomerService { 7 | //用户注册 8 | void register(Customer customer) throws CustomerServiceException; 9 | //用户登陆 10 | Customer login(String name,String password) throws CustomerServiceException; 11 | //用户更新 12 | void update(Customer customer) throws CustomerServiceException; 13 | } 14 | -------------------------------------------------------------------------------- /estore/src/com/briup/service/IOrderService.java: -------------------------------------------------------------------------------- 1 | package com.briup.service; 2 | 3 | import java.util.Map; 4 | 5 | import com.briup.bean.Book; 6 | import com.briup.bean.OrderLine; 7 | import com.briup.bean.Orderform; 8 | import com.briup.common.exception.OrderServiceException; 9 | 10 | public interface IOrderService { 11 | //保存订单 12 | void saveOrder(Orderform order) throws OrderServiceException; 13 | //删除订单 14 | void delOrder(Long orderid) throws OrderServiceException; 15 | //查找用户所有订单 16 | Map listAllOrder(Long customerid) throws OrderServiceException; 17 | //查找单个订单 18 | Orderform findOrderById(Long orderid) throws OrderServiceException; 19 | //查找所有书籍 20 | Map listAllBook() throws OrderServiceException; 21 | void saveOrderLine(OrderLine line); 22 | } 23 | -------------------------------------------------------------------------------- /estore/src/com/briup/web/filter/EncodeFilter.java: -------------------------------------------------------------------------------- 1 | package com.briup.web.filter; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.Filter; 5 | import javax.servlet.FilterChain; 6 | import javax.servlet.FilterConfig; 7 | import javax.servlet.ServletException; 8 | import javax.servlet.ServletRequest; 9 | import javax.servlet.ServletResponse; 10 | 11 | public class EncodeFilter implements Filter { 12 | public void destroy() { 13 | } 14 | 15 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { 16 | request.setCharacterEncoding("UTF-8"); 17 | response.setCharacterEncoding("UTF-8"); 18 | chain.doFilter(request, response); 19 | } 20 | 21 | public void init(FilterConfig fConfig) throws ServletException { 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /estore/src/com/briup/web/listener/ContextListener.java: -------------------------------------------------------------------------------- 1 | package com.briup.web.listener; 2 | 3 | import java.util.Map; 4 | 5 | import javax.servlet.ServletContextEvent; 6 | import javax.servlet.ServletContextListener; 7 | 8 | import com.briup.bean.Book; 9 | import com.briup.common.BeanFactory; 10 | import com.briup.common.exception.OrderServiceException; 11 | import com.briup.service.IOrderService; 12 | 13 | public class ContextListener 14 | implements ServletContextListener{ 15 | private IOrderService service = 16 | (IOrderService)BeanFactory.getBean( 17 | BeanFactory.ORDERSERVICE); 18 | @Override 19 | public void contextInitialized(ServletContextEvent sce) { 20 | try { 21 | Map map = 22 | service.listAllBook(); 23 | sce.getServletContext() 24 | .setAttribute("books", map); 25 | } catch (OrderServiceException e) { 26 | e.printStackTrace(); 27 | } 28 | } 29 | 30 | @Override 31 | public void contextDestroyed(ServletContextEvent sce) { 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /estore/src/com/briup/web/listener/SessionListener.java: -------------------------------------------------------------------------------- 1 | package com.briup.web.listener; 2 | 3 | import javax.servlet.http.HttpSession; 4 | import javax.servlet.http.HttpSessionEvent; 5 | import javax.servlet.http.HttpSessionListener; 6 | 7 | import com.briup.bean.ShoppingCart; 8 | 9 | public class SessionListener implements HttpSessionListener { 10 | public void sessionCreated(HttpSessionEvent se) { 11 | HttpSession session = se.getSession(); 12 | ShoppingCart sc = new ShoppingCart(); 13 | session.setAttribute("cart", sc); 14 | System.out.println("session listener"); 15 | } 16 | public void sessionDestroyed(HttpSessionEvent se) { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /estore/src/com/briup/web/servlet/ModifiCartServlet.java: -------------------------------------------------------------------------------- 1 | package com.briup.web.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | import com.briup.bean.ShoppingCart; 11 | 12 | public class ModifiCartServlet extends HttpServlet { 13 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 14 | String bookid = request.getParameter("productid"); 15 | String number = request.getParameter("number"); 16 | HttpSession session = request.getSession(); 17 | ShoppingCart cart = 18 | (ShoppingCart) session.getAttribute("cart"); 19 | cart.modifyLine(Long.parseLong(bookid), 20 | Long.parseLong(number)); 21 | response.sendRedirect("shopcart.jsp"); 22 | } 23 | 24 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 25 | doGet(request, response); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /estore/src/com/briup/web/servlet/RemoveProductServlet.java: -------------------------------------------------------------------------------- 1 | package com.briup.web.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | import com.briup.bean.ShoppingCart; 10 | 11 | public class RemoveProductServlet extends HttpServlet { 12 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 13 | Long bookid = 14 | Long.parseLong(request.getParameter("productid")); 15 | ShoppingCart sc = 16 | (ShoppingCart) request.getSession() 17 | .getAttribute("cart"); 18 | 19 | sc.dropLine(bookid); 20 | response.sendRedirect("shopcart.jsp"); 21 | } 22 | 23 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 24 | doGet(request, response); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /estore/src/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d [%-5p] %c - %m%n 5 | #show sql 6 | log4j.logger.java.sql.ResultSet=INFO 7 | log4j.logger.org.apache=INFO 8 | log4j.logger.java.sql.Connection=DEBUG 9 | log4j.logger.java.sql.Statement=DEBUG 10 | log4j.logger.java.sql.PreparedStatement=DEBUG -------------------------------------------------------------------------------- /seckill/.idea/artifacts/seckill_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /seckill/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /seckill/.idea/dataSources.local.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #@ 7 | ` 8 | 9 | 10 | master_key 11 | hjy 12 | *:seckill 13 | 14 | 15 | -------------------------------------------------------------------------------- /seckill/.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | mysql 6 | true 7 | com.mysql.jdbc.Driver 8 | jdbc:mysql://localhost:3306/seckill 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /seckill/.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__c3p0_c3p0_0_9_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_5_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_5_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__jstl_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__junit_junit_4_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_35.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_mybatis_mybatis_3_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_mybatis_mybatis_spring_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_aop_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_beans_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_context_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_core_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_expression_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_jdbc_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_test_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_tx_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_web_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__org_springframework_spring_webmvc_4_1_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/libraries/Maven__taglibs_standard_1_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /seckill/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /seckill/.idea/sqldialects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /seckill/src/main/java/org/seckill/dao/SeckillDao.java: -------------------------------------------------------------------------------- 1 | package org.seckill.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.seckill.entity.Seckill; 5 | 6 | import java.util.Date; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by hujiayu on 2017/5/11. 11 | */ 12 | public interface SeckillDao { 13 | 14 | /** 15 | * 减库存 16 | * @param seckillId 17 | * @param killTime 18 | * @return 如果影响行数>1,表示更新的记录行数 19 | */ 20 | int reduceNumber(@Param("seckillId") long seckillId,@Param("killTime") Date killTime); 21 | 22 | /** 23 | * 根据Id查询秒杀对象 24 | * @param seckillId 25 | * @return 26 | */ 27 | Seckill queryById(long seckillId); 28 | 29 | /** 30 | * 根据偏移量查询秒杀商品列表 31 | * @param offset 32 | * @param limit 33 | * @return 34 | */ 35 | List queryAll(@Param("offset") int offset, @Param("limit") int limit); 36 | } 37 | -------------------------------------------------------------------------------- /seckill/src/main/java/org/seckill/dao/SuccessKilledDao.java: -------------------------------------------------------------------------------- 1 | package org.seckill.dao; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.seckill.entity.SuccessKilled; 5 | 6 | /** 7 | * Created by hujiayu on 2017/5/11. 8 | */ 9 | public interface SuccessKilledDao { 10 | 11 | /** 12 | * 插入购买明细,可以过滤重复。 13 | * @param seckillId 14 | * @param userPhone 15 | * @return 插入的行数 16 | */ 17 | int insertSuccessKilled(@Param("seckillId") long seckillId,@Param("userPhone") long userPhone); 18 | 19 | /** 20 | * 根据id查询SuccessKilled并携带秒杀产品对象实体。 21 | * @param seckillId 22 | * @return 23 | */ 24 | SuccessKilled queryByIdWithSeckill(@Param("seckillId") long seckillId,@Param("userPhone") long userPhone); 25 | } 26 | -------------------------------------------------------------------------------- /seckill/src/main/java/org/seckill/dto/SeckillResult.java: -------------------------------------------------------------------------------- 1 | package org.seckill.dto; 2 | 3 | /** 4 | * Created by hujiayu on 2017/7/27. 5 | */ 6 | //所有ajax的请求返回类型,封装json结果 7 | public class SeckillResult { 8 | 9 | private boolean success; 10 | 11 | private T data; 12 | 13 | private String error; //错误信息 14 | 15 | public SeckillResult(boolean status, T data) { 16 | this.success = status; 17 | this.data = data; 18 | } 19 | 20 | public SeckillResult(boolean status, String error) { 21 | this.success = status; 22 | this.error = error; 23 | } 24 | 25 | public boolean isSuccess() { 26 | return success; 27 | } 28 | 29 | public void setSuccess(boolean status) { 30 | this.success = status; 31 | } 32 | 33 | public T getData() { 34 | return data; 35 | } 36 | 37 | public void setData(T data) { 38 | this.data = data; 39 | } 40 | 41 | public String getError() { 42 | return error; 43 | } 44 | 45 | public void setError(String error) { 46 | this.error = error; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /seckill/src/main/java/org/seckill/enums/SeckillStatEnum.java: -------------------------------------------------------------------------------- 1 | package org.seckill.enums; 2 | 3 | /** 4 | * 使用枚举表示常量数据 5 | * Created by hujiayu on 2017/6/28. 6 | */ 7 | public enum SeckillStatEnum { 8 | SUCCESS(1,"秒杀成功"), 9 | END(0,"秒杀结束"), 10 | REPEAT_KILL(-1,"重复秒杀"), 11 | INNER_ERROR(-2,"系统异常"), 12 | DATA_REWRITE(-3,"数据篡改"); 13 | 14 | 15 | private int state; 16 | 17 | private String stateInfo; 18 | 19 | SeckillStatEnum(int state, String stateInfo) { 20 | this.state = state; 21 | this.stateInfo = stateInfo; 22 | } 23 | 24 | public int getState() { 25 | return state; 26 | } 27 | 28 | public String getStateInfo() { 29 | return stateInfo; 30 | } 31 | 32 | public static SeckillStatEnum startOf(int index){ 33 | for(SeckillStatEnum state : values()){ 34 | if(state.getState() == index){ 35 | return state; 36 | } 37 | } 38 | return null; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /seckill/src/main/java/org/seckill/exception/RepeatKillException.java: -------------------------------------------------------------------------------- 1 | package org.seckill.exception; 2 | 3 | /** 4 | * 重复秒杀异常(运行期异常) 5 | * Created by hujiayu on 2017/5/29. 6 | */ 7 | public class RepeatKillException extends SeckillException { 8 | 9 | public RepeatKillException(String message) { 10 | super(message); 11 | } 12 | 13 | public RepeatKillException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /seckill/src/main/java/org/seckill/exception/SeckillCloseException.java: -------------------------------------------------------------------------------- 1 | package org.seckill.exception; 2 | 3 | /** 4 | * 秒杀关闭异常 5 | * Created by hujiayu on 2017/5/29. 6 | */ 7 | public class SeckillCloseException extends SeckillException { 8 | 9 | public SeckillCloseException(String message) { 10 | super(message); 11 | } 12 | 13 | public SeckillCloseException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /seckill/src/main/java/org/seckill/exception/SeckillException.java: -------------------------------------------------------------------------------- 1 | package org.seckill.exception; 2 | 3 | /** 4 | * 秒杀业务相关异常 5 | * Created by hujiayu on 2017/5/29. 6 | */ 7 | public class SeckillException extends RuntimeException { 8 | 9 | public SeckillException(String message) { 10 | super(message); 11 | } 12 | 13 | public SeckillException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /seckill/src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | driver=com.mysql.jdbc.Driver 2 | url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf-8 3 | user=hjy 4 | password=12345678 5 | -------------------------------------------------------------------------------- /seckill/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /seckill/src/main/resources/mapper/SeckillDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | /*具体的sql*/ 10 | UPDATE 11 | seckill 12 | SET 13 | number = number - 1 14 | WHERE seckill_id = #{seckillId} 15 | AND start_time #{killTime} 16 | AND end_time >= #{killTime} 17 | AND number > 0; 18 | 19 | 20 | 25 | 26 | 33 | 34 | -------------------------------------------------------------------------------- /seckill/src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /seckill/src/main/webapp/WEB-INF/jsp/common/head.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /seckill/src/main/webapp/WEB-INF/jsp/common/tag.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 2 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -------------------------------------------------------------------------------- /seckill/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /seckill/target/classes/jdbc.properties: -------------------------------------------------------------------------------- 1 | driver=com.mysql.jdbc.Driver 2 | url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf-8 3 | user=hjy 4 | password=12345678 5 | -------------------------------------------------------------------------------- /seckill/target/classes/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /seckill/target/classes/mapper/SeckillDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | /*具体的sql*/ 10 | UPDATE 11 | seckill 12 | SET 13 | number = number - 1 14 | WHERE seckill_id = #{seckillId} 15 | AND start_time #{killTime} 16 | AND end_time >= #{killTime} 17 | AND number > 0; 18 | 19 | 20 | 25 | 26 | 33 | 34 | -------------------------------------------------------------------------------- /seckill/target/classes/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/dao/SeckillDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/dao/SeckillDao.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/dao/SuccessKilledDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/dao/SuccessKilledDao.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/dto/ExposerRsp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/dto/ExposerRsp.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/dto/SeckillExecutionRsp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/dto/SeckillExecutionRsp.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/dto/SeckillResult.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/dto/SeckillResult.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/entity/Seckill.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/entity/Seckill.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/entity/SuccessKilled.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/entity/SuccessKilled.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/enums/SeckillStatEnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/enums/SeckillStatEnum.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/exception/RepeatKillException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/exception/RepeatKillException.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/exception/SeckillCloseException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/exception/SeckillCloseException.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/exception/SeckillException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/exception/SeckillException.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/service/SeckillService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/service/SeckillService.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/service/impl/SeckillServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/service/impl/SeckillServiceImpl.class -------------------------------------------------------------------------------- /seckill/target/classes/org/seckill/web/SeckillController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/classes/org/seckill/web/SeckillController.class -------------------------------------------------------------------------------- /seckill/target/seckill/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: hujiayu 3 | Created-By: IntelliJ IDEA 4 | Build-Jdk: 1.8.0_65 5 | 6 | -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/jdbc.properties: -------------------------------------------------------------------------------- 1 | driver=com.mysql.jdbc.Driver 2 | url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf-8 3 | user=hjy 4 | password=12345678 5 | -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/mapper/SeckillDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | /*具体的sql*/ 10 | UPDATE 11 | seckill 12 | SET 13 | number = number - 1 14 | WHERE seckill_id = #{seckillId} 15 | AND start_time #{killTime} 16 | AND end_time >= #{killTime} 17 | AND number > 0; 18 | 19 | 20 | 25 | 26 | 33 | 34 | -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/dao/SeckillDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/dao/SeckillDao.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/dao/SuccessKilledDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/dao/SuccessKilledDao.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/dto/ExposerRsp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/dto/ExposerRsp.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/dto/SeckillExecutionRsp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/dto/SeckillExecutionRsp.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/dto/SeckillResult.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/dto/SeckillResult.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/entity/Seckill.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/entity/Seckill.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/entity/SuccessKilled.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/entity/SuccessKilled.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/enums/SeckillStatEnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/enums/SeckillStatEnum.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/exception/RepeatKillException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/exception/RepeatKillException.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/exception/SeckillCloseException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/exception/SeckillCloseException.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/exception/SeckillException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/exception/SeckillException.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/service/SeckillService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/service/SeckillService.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/service/impl/SeckillServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/service/impl/SeckillServiceImpl.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/classes/org/seckill/web/SeckillController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/classes/org/seckill/web/SeckillController.class -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/jsp/common/head.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/jsp/common/tag.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 2 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/aopalliance-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/aopalliance-1.0.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/c3p0-0.9.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/c3p0-0.9.1.2.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/jackson-annotations-2.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/jackson-annotations-2.5.0.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/jackson-core-2.5.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/jackson-core-2.5.4.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/jackson-databind-2.5.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/jackson-databind-2.5.4.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/javax.servlet-api-3.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/javax.servlet-api-3.1.0.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/logback-classic-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/logback-classic-1.1.1.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/logback-core-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/logback-core-1.1.1.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/mybatis-3.3.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/mybatis-3.3.0.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/mybatis-spring-1.2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/mybatis-spring-1.2.3.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/mysql-connector-java-5.1.35.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/mysql-connector-java-5.1.35.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/slf4j-api-1.7.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/slf4j-api-1.7.12.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-aop-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-aop-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-beans-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-beans-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-context-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-context-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-core-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-core-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-expression-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-expression-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-jdbc-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-jdbc-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-test-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-test-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-tx-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-tx-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-web-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-web-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/spring-webmvc-4.1.7.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/spring-webmvc-4.1.7.RELEASE.jar -------------------------------------------------------------------------------- /seckill/target/seckill/WEB-INF/lib/standard-1.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/seckill/WEB-INF/lib/standard-1.1.2.jar -------------------------------------------------------------------------------- /seckill/target/seckill/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /seckill/target/test-classes/org/seckill/dao/SeckillDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/test-classes/org/seckill/dao/SeckillDaoTest.class -------------------------------------------------------------------------------- /seckill/target/test-classes/org/seckill/dao/SuccessKilledDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/test-classes/org/seckill/dao/SuccessKilledDaoTest.class -------------------------------------------------------------------------------- /seckill/target/test-classes/org/seckill/service/SeckillServiceTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/seckill/target/test-classes/org/seckill/service/SeckillServiceTest.class -------------------------------------------------------------------------------- /springboot-shiro/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | -------------------------------------------------------------------------------- /springboot-shiro/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/springboot-shiro/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /springboot-shiro/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /springboot-shiro/readme.md: -------------------------------------------------------------------------------- 1 | # springboot + shiro 2 | ## 介绍 3 | springboot + shiro + mybatis-plus 集成项目, 使用 mybatis-plus 生成 entity 和 dao 代码,集成 shiro 的权限控制 4 | 5 | ## 需要知识 6 | 7 | * springboot 8 | * mybatis 9 | * shiro 10 | 11 | ## 源码 12 | 见本项目 13 | 14 | ## 项目启动 15 | 1. 导入 sql , 修改数据库配置 16 | 2. [Redis Windows版本](https://github.com/MicrosoftArchive/redis/releases)下载 。直接下载zip版本解压到任意目录即可。 17 | 下载后,使用cmd命令切换到Redis根目录,然后运行`redis-server.exe redis.windows.conf`启动即可。 18 | 19 | ## 收获 20 | Please feel free to contact us with any questions you may have. 21 | 22 | ## 参考 23 | [shiro 参考](https://mrbird.cc/tags/Shiro/) 24 | [mybatis-plus 参考官网](https://mp.baomidou.com/) -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class DemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(DemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/common/config/MybatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.common.config; 2 | 3 | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.transaction.annotation.EnableTransactionManagement; 8 | 9 | /** 10 | * example 11 | * 12 | * @author hjy 13 | * @date 2019/3/18 14 | **/ 15 | @Configuration 16 | @MapperScan("com.springboot.demo.sys.mapper") 17 | public class MybatisPlusConfig { 18 | 19 | /** 20 | * 分页插件 21 | */ 22 | @Bean 23 | public PaginationInterceptor paginationInterceptor() { 24 | return new PaginationInterceptor(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/common/config/generatir/App.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.common.config.generatir; 2 | 3 | /** 4 | * example 5 | * 6 | * @author hjy 7 | * @date 2019/3/18 8 | **/ 9 | public class App { 10 | public static void main(String[] args) { 11 | GeneratorUtils.generateCode(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/common/domain/QueryRequest.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.common.domain; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | 6 | import java.io.Serializable; 7 | 8 | @Data 9 | @ToString 10 | public class QueryRequest implements Serializable { 11 | 12 | private static final long serialVersionUID = -4869594085374385813L; 13 | 14 | private int pageSize; 15 | private int pageNum; 16 | 17 | private String sortField; 18 | private String sortOrder; 19 | } -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/common/util/MD5Utils.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.common.util; 2 | 3 | import org.apache.shiro.crypto.hash.SimpleHash; 4 | import org.apache.shiro.util.ByteSource; 5 | 6 | public class MD5Utils { 7 | private static final String SALT = "springBoot"; 8 | 9 | private static final String ALGORITH_NAME = "md5"; 10 | 11 | private static final int HASH_ITERATIONS = 2; 12 | 13 | public static String encrypt(String pswd) { 14 | String newPassword = new SimpleHash(ALGORITH_NAME, pswd, ByteSource.Util.bytes(SALT), HASH_ITERATIONS).toHex(); 15 | return newPassword; 16 | } 17 | 18 | public static String encrypt(String username, String pswd) { 19 | String newPassword = new SimpleHash(ALGORITH_NAME, pswd, ByteSource.Util.bytes(username + SALT), 20 | HASH_ITERATIONS).toHex(); 21 | return newPassword; 22 | } 23 | public static void main(String[] args) { 24 | 25 | System.out.println(MD5Utils.encrypt("test", "123456")); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/controller/SysMenuController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | *

10 | * 前端控制器 11 | *

12 | * 13 | * @author hjy 14 | * @since 2019-03-18 15 | */ 16 | @RestController 17 | @RequestMapping("/sys/sysMenu") 18 | public class SysMenuController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/controller/SysRoleController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.controller; 2 | 3 | 4 | import com.springboot.demo.sys.entity.SysRole; 5 | import com.springboot.demo.sys.service.SysRoleService; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import javax.annotation.Resource; 13 | import javax.validation.constraints.NotBlank; 14 | import java.util.List; 15 | 16 | /** 17 | *

18 | * 前端控制器 19 | *

20 | * 21 | * @author hjy 22 | * @since 2019-03-18 23 | */ 24 | @RestController 25 | @RequestMapping("/sys/role") 26 | public class SysRoleController { 27 | 28 | @Resource 29 | private SysRoleService roleService; 30 | 31 | @GetMapping("{username}") 32 | public List roleList(@NotBlank(message = "{required}") @PathVariable String username) { 33 | return this.roleService.findUserRole(username); 34 | } 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/controller/SysRoleMenuController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | *

10 | * 前端控制器 11 | *

12 | * 13 | * @author hjy 14 | * @since 2019-03-18 15 | */ 16 | @RestController 17 | @RequestMapping("/sys/sysRoleMenu") 18 | public class SysRoleMenuController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/controller/SysUserRoleController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.controller; 2 | 3 | 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | *

10 | * 前端控制器 11 | *

12 | * 13 | * @author hjy 14 | * @since 2019-03-18 15 | */ 16 | @RestController 17 | @RequestMapping("/sys/sysUserRole") 18 | public class SysUserRoleController { 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/mapper/SysMenuMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.mapper; 2 | 3 | import com.springboot.demo.sys.entity.SysMenu; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * Mapper 接口 12 | *

13 | * 14 | * @author hjy 15 | * @since 2019-03-18 16 | */ 17 | public interface SysMenuMapper extends BaseMapper { 18 | 19 | List findUserPermissions(String userName); 20 | } 21 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/mapper/SysRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.mapper; 2 | 3 | import com.springboot.demo.sys.entity.SysRole; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | *

12 | * Mapper 接口 13 | *

14 | * 15 | * @author hjy 16 | * @since 2019-03-18 17 | */ 18 | public interface SysRoleMapper extends BaseMapper { 19 | 20 | List findUserRole(String userName); 21 | } 22 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/mapper/SysRoleMenuMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.mapper; 2 | 3 | import com.springboot.demo.sys.entity.SysRoleMenu; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author hjy 13 | * @since 2019-03-18 14 | */ 15 | public interface SysRoleMenuMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/mapper/SysUserMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.mapper; 2 | 3 | import com.springboot.demo.sys.entity.SysUser; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author hjy 13 | * @since 2019-03-18 14 | */ 15 | public interface SysUserMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/mapper/SysUserRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.mapper; 2 | 3 | import com.springboot.demo.sys.entity.SysUserRole; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author hjy 13 | * @since 2019-03-18 14 | */ 15 | public interface SysUserRoleMapper extends BaseMapper { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/SysMenuService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service; 2 | 3 | import com.springboot.demo.sys.entity.SysMenu; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 服务类 11 | *

12 | * 13 | * @author hjy 14 | * @since 2019-03-18 15 | */ 16 | public interface SysMenuService extends IService { 17 | 18 | List findUserPermissions(String userName); 19 | } 20 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/SysRoleMenuService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service; 2 | 3 | import com.springboot.demo.sys.entity.SysRoleMenu; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author hjy 12 | * @since 2019-03-18 13 | */ 14 | public interface SysRoleMenuService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/SysRoleService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service; 2 | 3 | import com.springboot.demo.sys.entity.SysRole; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 服务类 11 | *

12 | * 13 | * @author hjy 14 | * @since 2019-03-18 15 | */ 16 | public interface SysRoleService extends IService { 17 | 18 | List findUserRole(String userName); 19 | } 20 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/SysUserRoleService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service; 2 | 3 | import com.springboot.demo.sys.entity.SysUserRole; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author hjy 12 | * @since 2019-03-18 13 | */ 14 | public interface SysUserRoleService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/SysUserService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service; 2 | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | import com.springboot.demo.sys.entity.SysUser; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | /** 10 | *

11 | * 服务类 12 | *

13 | * 14 | * @author hjy 15 | * @since 2019-03-18 16 | */ 17 | public interface SysUserService extends IService { 18 | 19 | IPage selectByPage(@Param("page") Page page); 20 | 21 | SysUser findByName(String userName); 22 | } 23 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/impl/SysMenuServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service.impl; 2 | 3 | import com.springboot.demo.sys.entity.SysMenu; 4 | import com.springboot.demo.sys.mapper.SysMenuMapper; 5 | import com.springboot.demo.sys.service.SysMenuService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import javax.annotation.Resource; 11 | import java.util.List; 12 | 13 | /** 14 | *

15 | * 服务实现类 16 | *

17 | * 18 | * @author hjy 19 | * @since 2019-03-18 20 | */ 21 | @Service 22 | public class SysMenuServiceImpl extends ServiceImpl implements SysMenuService { 23 | 24 | @Autowired 25 | private SysMenuMapper menuMapper; 26 | 27 | @Override 28 | public List findUserPermissions(String userName) { 29 | return menuMapper.findUserPermissions(userName); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/impl/SysRoleMenuServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service.impl; 2 | 3 | import com.springboot.demo.sys.entity.SysRoleMenu; 4 | import com.springboot.demo.sys.mapper.SysRoleMenuMapper; 5 | import com.springboot.demo.sys.service.SysRoleMenuService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author hjy 15 | * @since 2019-03-18 16 | */ 17 | @Service 18 | public class SysRoleMenuServiceImpl extends ServiceImpl implements SysRoleMenuService { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/impl/SysRoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service.impl; 2 | 3 | import com.springboot.demo.sys.entity.SysRole; 4 | import com.springboot.demo.sys.mapper.SysRoleMapper; 5 | import com.springboot.demo.sys.service.SysRoleService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import javax.annotation.Resource; 11 | import java.util.List; 12 | 13 | /** 14 | *

15 | * 服务实现类 16 | *

17 | * 18 | * @author hjy 19 | * @since 2019-03-18 20 | */ 21 | @Service 22 | public class SysRoleServiceImpl extends ServiceImpl implements SysRoleService { 23 | 24 | @Resource 25 | private SysRoleMapper roleMapper; 26 | 27 | @Override 28 | public List findUserRole(String userName) { 29 | return roleMapper.findUserRole(userName); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/java/com/springboot/demo/sys/service/impl/SysUserRoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo.sys.service.impl; 2 | 3 | import com.springboot.demo.sys.entity.SysUserRole; 4 | import com.springboot.demo.sys.mapper.SysUserRoleMapper; 5 | import com.springboot.demo.sys.service.SysUserRoleService; 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author hjy 15 | * @since 2019-03-18 16 | */ 17 | @Service 18 | public class SysUserRoleServiceImpl extends ServiceImpl implements SysUserRoleService { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | driver-class-name: com.mysql.cj.jdbc.Driver 4 | schema: classpath:db/schema-mysql.sql 5 | data: classpath:db/data-mysql.sql 6 | url: jdbc:mysql://119.23.236.26:3306/shiro_demo?useUnicode=true&useSSL=false&characterEncoding=utf8 7 | username: honey 8 | password: Honey521. 9 | thymeleaf: 10 | cache: false 11 | 12 | 13 | redis: 14 | # Redis数据库索引(默认为0) 15 | database: 0 16 | # Redis服务器地址 17 | host: 127.0.0.1 18 | # Redis服务器连接端口 19 | port: 6379 20 | # Redis 密码 21 | password: 22 | jedis: 23 | pool: 24 | # 连接池中的最小空闲连接 25 | min-idle: 8 26 | # 连接池中的最大空闲连接 27 | max-idle: 500 28 | # 连接池最大连接数(使用负值表示没有限制) 29 | max-active: 2000 30 | # 连接池最大阻塞等待时间(使用负值表示没有限制) 31 | max-wait: 10000 32 | # 连接超时 33 | timeout: 0 34 | 35 | 36 | # Logger Config 37 | logging: 38 | level: 39 | com.springboot.demo: debug 40 | 41 | mybatis-plus: 42 | typeAliasesPackage: com.springboot.demo.sys.entity 43 | mapper-locations: classpath:mapper/*.xml 44 | 45 | 46 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/resources/mapper/SysMenuMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/resources/mapper/SysRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/resources/mapper/SysRoleMenuMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/resources/mapper/SysUserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/resources/mapper/SysUserRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /springboot-shiro/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 首页 7 | 8 | 9 |

你好![[${user.username}]]

10 |

你的角色为超级管理员

11 |

你的角色为测试账户

12 | 17 | 在线用户管理 18 | 注销 19 | 20 | -------------------------------------------------------------------------------- /springboot-shiro/src/test/java/com/springboot/demo/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.demo; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class DemoApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tomcatServer3.0/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tomcatServer3.0/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | tomcatServer3.0 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /tomcatServer3.0/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.8 12 | -------------------------------------------------------------------------------- /tomcatServer3.0/bin/com/hjy/GetPosyTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/bin/com/hjy/GetPosyTest.class -------------------------------------------------------------------------------- /tomcatServer3.0/bin/com/hjy/request/Request.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/bin/com/hjy/request/Request.class -------------------------------------------------------------------------------- /tomcatServer3.0/bin/com/hjy/response/Response.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/bin/com/hjy/response/Response.class -------------------------------------------------------------------------------- /tomcatServer3.0/bin/com/hjy/server/Server.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/bin/com/hjy/server/Server.class -------------------------------------------------------------------------------- /tomcatServer3.0/bin/com/hjy/serverThread/ServerThread.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/bin/com/hjy/serverThread/ServerThread.class -------------------------------------------------------------------------------- /tomcatServer3.0/bin/com/hjy/util/GetParm.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/bin/com/hjy/util/GetParm.class -------------------------------------------------------------------------------- /tomcatServer3.0/bin/source/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/bin/source/2.jpg -------------------------------------------------------------------------------- /tomcatServer3.0/bin/source/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | error 6 | 7 | 8 |

file not found

9 | 10 | -------------------------------------------------------------------------------- /tomcatServer3.0/bin/source/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |
9 | 账号:
10 | 密码:
11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /tomcatServer3.0/bin/source/post.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |
9 | 账号:
10 | 密码:
11 | 12 |
13 | < n /body> 14 | -------------------------------------------------------------------------------- /tomcatServer3.0/bin/source/property.properties: -------------------------------------------------------------------------------- 1 | ip=127.0.0.1 2 | port=8888 -------------------------------------------------------------------------------- /tomcatServer3.0/bin/source/success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |

success

9 | 10 | -------------------------------------------------------------------------------- /tomcatServer3.0/readme.md: -------------------------------------------------------------------------------- 1 | # Java 实现 Tomcat 服务器 2 | ## 介绍 3 | 本项目模仿tomcat,封装request和response,帮助理解tomcat源码。 4 | 5 | ## 需要知识 6 | 7 | * 了解http协议 8 | * java多线程和网络编程 9 | 10 | 11 | ## 源码 12 | 见本项目 13 | 14 | 15 | ## 收获 16 | 使用Java模拟浏览器发送请求给服务器,服务器接受请求并相应,锻炼java知识,帮助理解http协议和tomcat工作原理。 17 | 18 | Please feel free to contact us with any questions you may have. 19 | -------------------------------------------------------------------------------- /tomcatServer3.0/src/com/hjy/serverThread/ServerThread.java: -------------------------------------------------------------------------------- 1 | package com.hjy.serverThread; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.net.Socket; 6 | 7 | import com.hjy.request.Request; 8 | import com.hjy.response.Response; 9 | 10 | public class ServerThread extends Thread{ 11 | private Socket client; 12 | public ServerThread() {} 13 | public ServerThread(Socket client){ 14 | this.client = client; 15 | } 16 | @Override 17 | public void run() { 18 | Request request = new Request(client); 19 | Response response = new Response(client); 20 | response.forward(request.getUrl()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tomcatServer3.0/src/com/hjy/util/GetParm.java: -------------------------------------------------------------------------------- 1 | package com.hjy.util; 2 | 3 | import java.net.URLDecoder; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | 7 | //模拟浏览器发送请求给服务器 8 | public class GetParm { 9 | private Map map = new HashMap() ; 10 | public GetParm() {} 11 | 12 | public Map getParm(String property){ 13 | String[] split3 = property.split("&"); 14 | 15 | for (int i = 0; i < split3.length; i++) { 16 | String[] split4 = split3[i].split("="); 17 | map.put(split4[0], URLDecoder.decode(split4[1])); 18 | } 19 | System.out.println(map); 20 | return map; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tomcatServer3.0/src/source/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/tomcatServer3.0/src/source/2.jpg -------------------------------------------------------------------------------- /tomcatServer3.0/src/source/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | error 6 | 7 | 8 |

file not found

9 | 10 | -------------------------------------------------------------------------------- /tomcatServer3.0/src/source/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |
9 | 账号:
10 | 密码:
11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /tomcatServer3.0/src/source/post.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |
9 | 账号:
10 | 密码:
11 | 12 |
13 | < n /body> 14 | -------------------------------------------------------------------------------- /tomcatServer3.0/src/source/property.properties: -------------------------------------------------------------------------------- 1 | ip=127.0.0.1 2 | port=8888 -------------------------------------------------------------------------------- /tomcatServer3.0/src/source/success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |

success

9 | 10 | -------------------------------------------------------------------------------- /woss/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /woss/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | woss 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /woss/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /woss/.settings/org.eclipse.core.runtime.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | line.separator=\r\n 3 | -------------------------------------------------------------------------------- /woss/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /woss/bin/com.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com.zip -------------------------------------------------------------------------------- /woss/bin/com/briup/client/Client.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/client/Client.class -------------------------------------------------------------------------------- /woss/bin/com/briup/client/Gather.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/client/Gather.class -------------------------------------------------------------------------------- /woss/bin/com/briup/client/imp/ClientImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/client/imp/ClientImp.class -------------------------------------------------------------------------------- /woss/bin/com/briup/client/imp/GatherImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/client/imp/GatherImp.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/Backup.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/Backup.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/Configuration.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/Configuration.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/ConfigurationAWare.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/ConfigurationAWare.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/DBUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/DBUtils.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/Log.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/Log.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/WossModule.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/WossModule.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/imp/BackupImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/imp/BackupImp.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/imp/ConfigurationImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/imp/ConfigurationImp.class -------------------------------------------------------------------------------- /woss/bin/com/briup/common/imp/LogImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/common/imp/LogImp.class -------------------------------------------------------------------------------- /woss/bin/com/briup/main/ClientMain.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/main/ClientMain.class -------------------------------------------------------------------------------- /woss/bin/com/briup/main/ServerMain.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/main/ServerMain.class -------------------------------------------------------------------------------- /woss/bin/com/briup/model/BIDR.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/model/BIDR.class -------------------------------------------------------------------------------- /woss/bin/com/briup/server/DBStore.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/server/DBStore.class -------------------------------------------------------------------------------- /woss/bin/com/briup/server/Server.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/server/Server.class -------------------------------------------------------------------------------- /woss/bin/com/briup/server/imp/DBStoreImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/server/imp/DBStoreImp.class -------------------------------------------------------------------------------- /woss/bin/com/briup/server/imp/ServerImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/server/imp/ServerImp.class -------------------------------------------------------------------------------- /woss/bin/com/briup/server/imp/ServerThread.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/bin/com/briup/server/imp/ServerThread.class -------------------------------------------------------------------------------- /woss/jar/dom4j-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/jar/dom4j-1.6.1.jar -------------------------------------------------------------------------------- /woss/jar/log4j-1.2.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/jar/log4j-1.2.11.jar -------------------------------------------------------------------------------- /woss/jar/ojdbc14.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/jar/ojdbc14.jar -------------------------------------------------------------------------------- /woss/jar/ojdbc5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/jar/ojdbc5.jar -------------------------------------------------------------------------------- /woss/jar/ojdbc6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HelloWorld521/Java/9bd12073568d6a91366268106f06632f0f50321d/woss/jar/ojdbc6.jar -------------------------------------------------------------------------------- /woss/readme.md: -------------------------------------------------------------------------------- 1 | # 电信采集系统实现 2 | ## 介绍 3 | 该系统主要用于读取存放用户登录信息的文件,分析用户信息,从客户端发送至服务器,服务器处理信息,存放入数据库中。 4 | 5 | 系统主要分为6个模块:采集模块,发送模块,存储模块,备份模块,日志模块和配置模块(最重要的模块)。 6 | 7 | ## 需要知识 8 | * 采集模块:Java集合框架应用 9 | * 发送模块:多线程,网络编程 10 | * 存储模块:jdbc编程,oracle 11 | * 备份模块:JavaIO流 12 | * 日志模块:log4j 13 | * 配置模块:单例模式,dom4j解析xml,IOC控制反转 14 | 15 | 16 | ## 源码 17 | 见本项目 18 | 19 | 20 | ## 收获 21 | 这是一个很好的测试项目,不仅可以检验coreJava的基础知识,学习一些新知识,还可以培养自己一些面向接口的思想,IOC控制反转,设计模式等,为以后学习框架做准备。 22 | 23 | Please feel free to contact us with any questions you may have. 24 | -------------------------------------------------------------------------------- /woss/src/com/briup/client/Client.java: -------------------------------------------------------------------------------- 1 | package com.briup.client; 2 | 3 | import java.util.Collection; 4 | 5 | import com.briup.common.WossModule; 6 | import com.briup.model.BIDR; 7 | /** 8 | * Client接口是采集系统网络模块客户端的规范。 9 | * Client的作用就是与服务器端进行通信,传递数据。 10 | * @author briup 11 | * @version 1.0 2010-9-14 12 | * 13 | */ 14 | public interface Client extends WossModule{ 15 | /** 16 | * send方法用于与服务器端进行交互,发送BIDR集合至服务器端。 17 | * @param collection 18 | * 19 | */ 20 | public void send(Collection collection) throws Exception; 21 | } 22 | -------------------------------------------------------------------------------- /woss/src/com/briup/client/Gather.java: -------------------------------------------------------------------------------- 1 | package com.briup.client; 2 | 3 | import java.util.Collection; 4 | 5 | import com.briup.common.WossModule; 6 | import com.briup.model.BIDR; 7 | /** 8 | * Gather接口规定了采集模块所应有的方法。 9 | * 当Gather执行gather()方法时,开始对AAA服务器的计费信息进行采集。 10 | * 将采集的数据封装成为一个BIDR的集合返回。 11 | * @author briup 12 | * @version 1.0 2010-9-14 13 | */ 14 | public interface Gather extends WossModule{ 15 | /** 16 | * 采集AAA服务器的计费信息,将数据封装为BIDR集合返回。 17 | * @return 采集封装BIDR数据的集合 18 | */ 19 | public Collection gather()throws Exception; 20 | } 21 | -------------------------------------------------------------------------------- /woss/src/com/briup/common/Backup.java: -------------------------------------------------------------------------------- 1 | package com.briup.common; 2 | 3 | 4 | import java.util.Properties; 5 | 6 | /** 7 | * 备份类 8 | * @author Administrator 9 | */ 10 | public interface Backup extends WossModule{ 11 | @Override 12 | public void init(Properties properties); 13 | /** 14 | * 备份数据 15 | * @param fileName 备份文件 16 | * @param data 备份数据 17 | * @throws Exception 18 | * gatherFileName 19 | */ 20 | public void backup(String fileName,Object data) throws Exception; 21 | 22 | /** 23 | * 加载备份 24 | * @param fileName 备份文件 25 | * @return 备份数据 26 | * @throws Exception 27 | */ 28 | public Object load(String fileName) throws Exception; 29 | 30 | /** 31 | * 删除备份 32 | * @param fileName 33 | */ 34 | public void deleteBackup(String fileName); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /woss/src/com/briup/common/Configuration.java: -------------------------------------------------------------------------------- 1 | package com.briup.common; 2 | 3 | import com.briup.client.Client; 4 | import com.briup.client.Gather; 5 | import com.briup.server.DBStore; 6 | import com.briup.server.Server; 7 | 8 | 9 | /** 10 | * Configuration接口提供了配置模块的规范。 11 | * 配置模块通过某种配置方式将Logger、BackUP、Gather、Client、Server、DBStore等模块的实现类进行实例化, 12 | * 并且将其所需要配置信息予以传递。通过配置模块可以获得各个模块的实例。 13 | * 14 | * @author briup 15 | * @version 1.0 2010-9-14 16 | */ 17 | public interface Configuration { 18 | /** 19 | * 获取日志模块的实例 20 | */ 21 | public Log getLogger(); 22 | /** 23 | * 获取备份模块的实例 24 | */ 25 | public Backup getBackup(); 26 | /** 27 | * 获取采集模块的实例 28 | */ 29 | public Gather getGather(); 30 | /** 31 | * 获取客户端的实例 32 | */ 33 | public Client getClient(); 34 | /** 35 | * 获取服务器端的实例 36 | */ 37 | public Server getServer(); 38 | /** 39 | * 获取入库模块的实例 40 | */ 41 | public DBStore getDBStore(); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /woss/src/com/briup/common/ConfigurationAWare.java: -------------------------------------------------------------------------------- 1 | package com.briup.common; 2 | /** 3 | * 当某模块实现了该接口,那么配置模块在初始化该模块的同时会将自身的引用传递给该模块。 4 | * @author briup 5 | * @version 1.0 2010-9-14 6 | */ 7 | public interface ConfigurationAWare { 8 | /** 9 | * 该方法用于传递配置模块 10 | * @param configuration 传递的配置模块 11 | */ 12 | public void setConfiguration(Configuration configuration); 13 | } -------------------------------------------------------------------------------- /woss/src/com/briup/common/Log.java: -------------------------------------------------------------------------------- 1 | package com.briup.common; 2 | 3 | import java.util.Properties; 4 | 5 | import org.apache.log4j.Logger; 6 | 7 | 8 | public interface Log extends WossModule{ 9 | 10 | 11 | @Override 12 | public void init(Properties properties); 13 | /** 14 | * 获取客户端的日志记录器 15 | * @return 记录器 16 | */ 17 | public Logger getClientLogger(); 18 | 19 | /** 20 | * 获取服务器端的日志记录器 21 | * @return 记录器 22 | */ 23 | public Logger getServerLogger(); 24 | } 25 | -------------------------------------------------------------------------------- /woss/src/com/briup/common/WossModule.java: -------------------------------------------------------------------------------- 1 | package com.briup.common; 2 | 3 | import java.util.Properties; 4 | /** 5 | * 该接口是除配置模块以外的所有模块的父接口。用于模块接收初始化配置信息和注入配置模块。 6 | * @author briup 7 | * @version 1.0 2010-9-14 8 | * 9 | */ 10 | public interface WossModule{ 11 | /** 12 | * 将所需要的配置信息传递进该类,该类得到配置信息后进行初始化。 13 | * 建议在执行该类其他方法之前,先执行这个方法。 14 | * 15 | * @param properties 一个Properties实例封装了初始化所需的各种配置信息 16 | */ 17 | public void init(Properties properties); 18 | } -------------------------------------------------------------------------------- /woss/src/com/briup/main/ClientMain.java: -------------------------------------------------------------------------------- 1 | package com.briup.main; 2 | 3 | import java.util.Properties; 4 | 5 | import com.briup.client.Client; 6 | import com.briup.client.Gather; 7 | import com.briup.client.imp.ClientImp; 8 | import com.briup.client.imp.GatherImp; 9 | import com.briup.common.Backup; 10 | import com.briup.common.Configuration; 11 | import com.briup.common.Log; 12 | import com.briup.common.imp.ConfigurationImp; 13 | 14 | /** 15 | * @author Chen 16 | * 客户端启动 17 | * */ 18 | public class ClientMain { 19 | public static void main(String[] args) throws Exception { 20 | Configuration cfig = new ConfigurationImp(); 21 | Client client = cfig.getClient(); 22 | Gather gather = cfig.getGather(); 23 | client.send(gather.gather()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /woss/src/com/briup/main/ServerMain.java: -------------------------------------------------------------------------------- 1 | package com.briup.main; 2 | 3 | import java.util.Properties; 4 | 5 | import com.briup.common.imp.ConfigurationImp; 6 | import com.briup.server.Server; 7 | 8 | /** 9 | * @author Chen 10 | * 服务器启动 11 | * */ 12 | public class ServerMain { 13 | public static void main(String[] args) throws Exception { 14 | ConfigurationImp cfig = new ConfigurationImp(); 15 | Server server = cfig.getServer(); 16 | server.revicer(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /woss/src/com/briup/server/DBStore.java: -------------------------------------------------------------------------------- 1 | package com.briup.server; 2 | 3 | import java.util.Collection; 4 | 5 | import com.briup.common.WossModule; 6 | import com.briup.model.BIDR; 7 | /** 8 | * DBStore提供了入库模块的规范。 9 | * 该接口的实现类将BIDR集合持久化。 10 | * @author briup 11 | * @version 1.0 2010-9-14 12 | */ 13 | public interface DBStore extends WossModule{ 14 | /** 15 | * 将BIDR集合进行持久化 。 16 | * @param collection 需要储存的BIDR集合 17 | */ 18 | public void saveToDB(Collection collection)throws Exception; 19 | } -------------------------------------------------------------------------------- /woss/src/com/briup/server/Server.java: -------------------------------------------------------------------------------- 1 | package com.briup.server; 2 | 3 | import com.briup.common.WossModule; 4 | 5 | /** 6 | * Server接口提供了采集系统网络模块服务器端的标准。 7 | * Server的实现类需要实现与采集体统客户端进行交互,并调用DBStore将接收的数据持久化。 8 | * 当Server的实现类执行revicer()方法时,Server开始监听端口。 9 | * 当调用Server的shutdown方法时,Server将安全的停止服务。 10 | * @author briup 11 | * @version 1.0 2010-9-14 12 | * 13 | */ 14 | public interface Server extends WossModule{ 15 | /** 16 | * 该方法用于启动这个Server服务,开始接收客户端传递的信息,并且调用DBStore将接收的数据持久化。 17 | */ 18 | public void revicer()throws Exception; 19 | /** 20 | * 该方法用于使Server安全的停止运行。 21 | */ 22 | public void shutdown(); 23 | } --------------------------------------------------------------------------------