hotel

eclipse&myeclipse 生成jar包后,spring无法扫描到bean定义

天涯浪子 提交于 2019-11-28 21:44:11
问题:eclipse&myeclipse 生成jar包后,spring无法扫描到bean定义 在使用getbean或者扫包时注入bean失败,但在IDE里是可以正常运行的? 原因:导出jar未将目录一起导出。 解决方法:将代码目录一起导出:一定要勾选 Add directory enttries 区别: 代码结构: 未勾选,导出内容为: META-INF/MANIFEST.MF com/wang/util/DateStyle.class com/wang/util/PropertiesUtil$1.class com/wang/util/PropertiesUtil.class com/wang/util/Week.class com/wang/util/DateUtil.class com/wang/vo/request/hotel/test/PopularCityRequest.class com/wang/vo/request/hotel/test/EconomicsRequest.class com/wang/vo/request/hotel/test/HotelProductVouchRequest.class com/wang/vo/request/hotel/test/QueryOrderListRequest.class com/wang/vo/request

去哪儿网酒店信息采集

眉间皱痕 提交于 2019-11-27 12:39:45
# -*- coding: utf-8 -*- import urllib.request from bs4 import BeautifulSoup import csv import re #dizhi_url=['hohhot103','baotou114','chifeng202','tongliao458','ulanhot484','xilinhot500','manzhouli1083','wuhai1133'] def openlink(link): maxTryNum=20 for tries in range(maxTryNum): try: response = urllib.request.urlopen(link).read().decode('utf-8') return response except: if tries < (maxTryNum-1): continue else: print("Has tried %d times to access url %s, all failed!", maxTryNum, link) return None break #cityurl='http://hotels.ctrip.com/jiudian/neimenggu' ##print(cityurl) ##cityhtml = urllib

携程酒店信息采集

大城市里の小女人 提交于 2019-11-27 12:39:03
import urllib.request from bs4 import BeautifulSoup import csv import re def openlink(link): maxTryNum=20 for tries in range(maxTryNum): try: response = urllib.request.urlopen(link).read().decode('utf-8') return response except: if tries < (maxTryNum-1): continue else: print("Has tried %d times to access url %s, all failed!", maxTryNum, link) return None break cityurl='http://hotels.ctrip.com/jiudian/neimenggu' cityhtml = openlink(cityurl) citysoup = BeautifulSoup(cityhtml, 'html.parser') city_list = citysoup.find_all('ul', attrs={"class":"p_n_list grid_8"}) citysoup1 = BeautifulSoup(str(city

CodeForce Round 578 Div 2 A

为君一笑 提交于 2019-11-27 02:37:35
A. Hotelier Problem Amugae has a hotel consisting of 10 10 1 0 rooms. The rooms are numbered from 0 0 0 to 9 9 9 from left to right. The hotel has two entrances — one from the left end, and another from the right end. When a customer arrives to the hotel through the left entrance, they are assigned to an empty room closest to the left entrance. Similarly, when a customer arrives at the hotel through the right entrance, they are assigned to an empty room closest to the right entrance. One day, Amugae lost the room assignment list. Thankfully Amugae’s memory is perfect, and he remembers all of