maven部署项目到tomcat访问404

apache-tomcat-7.0.69,
apache-maven-3.3.9-bin,
myeclipse部署的项目可以访问。

1个回答

目录路径错误,看下maven打包部署路径,另外如果是非标准的maven项目,maven打包会丢掉文件,建议把项目结构和pom.xml贴出来

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
maven自动部署项目到tomcat总是403 Access Denied
试了很多权限都不行,如 <user username="test" password="123" roles="admin-gui,manager-gui,admin,manager,manager-script,tomcat" /> 目前的情况是可以登录tomcat的manger页面,但是maven部署的链接是 http://localhost:8080/manager/html/deploy?path=%2Fmyweb 对于http://localhost:8080/manager/html/deploy这个链接的访问就会报403 错误。 请问该怎么设置呢?先谢谢了。 弄了一天了,我想哭。。。
maven tomcat 插件 部署原理,及tomcat的访问流程??
很久之前通过maven tomcat7 部署项目后,现在一启动tomcat 就默认访问此项目,想删除此项目。。可找不到。。。
Maven项目部署到Tomcat的问题
项目不知道怎么回事,maven打包没有任何问题,Tomcat启动后web页面不能正常访问,控制台连续不断地输出以下信息: 七月 26, 2016 6:21:46 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-8080"] 七月 26, 2016 6:21:46 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-443"] 七月 26, 2016 6:21:46 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-bio-8009"] 七月 26, 2016 6:21:46 下午 org.apache.catalina.startup.Catalina start 信息: Server startup in 14546 ms 18:21:48.022 [Thread-7] DEBUG o.h.cache.redis.jedis.JedisClient - delete expired cache item in region[hibernate.org.hibernate.cache.internal.StandardQueryCache] expire time=[1469528508021] 18:22:00.015 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_QuartzSchedulerThread 18:22:00.016 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_QuartzSchedulerThread 18:22:00.018 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_QuartzSchedulerThread Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? 18:22:00.144 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_QuartzSchedulerThread 18:22:00.153 [schedFactoryBean_Worker-1] DEBUG org.quartz.core.JobRunShell - Calling execute on job DEFAULT.orderPayTimeOutJob Hibernate: select order0_.ID as ID1_29_, order0_.CREATEBY as CREATEBY2_29_, order0_.CREATETIME as CREATETI3_29_, order0_.UPDATEBY as UPDATEBY4_29_, order0_.UPDATETIME as UPDATETI5_29_, order0_.ADDR as ADDR6_29_, order0_.AREA_ID as AREA_ID32_29_, order0_.BUILDING as BUILDING7_29_, order0_.BUYCOUNT as BUYCOUNT8_29_, order0_.CITY_ID as CITY_ID33_29_, order0_.COMM_ID as COMM_ID34_29_, order0_.CONSIGEE as CONSIGEE9_29_, order0_.DELITIME as DELITIM10_29_, order0_.DELIVERY as DELIVER11_29_, order0_.DELIVERYFLAG as DELIVER12_29_, order0_.DELIVERYORDER_ID as DELIVER35_29_, order0_.DISTRCOMPLETETIME as DISTRCO13_29_, order0_.DISTRSTOREID as DISTRST14_29_, order0_.DISTRIBUTIONID as DISTRIB15_29_, order0_.FINSHTIME as FINSHTI16_29_, order0_.FLOOR as FLOOR17_29_, order0_.ORDER_ID as ORDER_I36_29_, order0_.MOBILE as MOBILE18_29_, order0_.NIGHTINCOME as NIGHTIN19_29_, order0_.NUMB as NUMB20_29_, order0_.ONLINEPAYNAME_ID as ONLINEP37_29_, order0_.OPERSTATUS as OPERSTA21_29_, order0_.ORDERBILLNO as ORDERBI22_29_, order0_.ORDERNO as ORDERNO23_29_, order0_.PAYABLE as PAYABLE24_29_, order0_.PAYMETHOD_ID as PAYMETH38_29_, order0_.PROVICE_ID as PROVICE39_29_, order0_.REMARK as REMARK25_29_, order0_.SHIPMENT as SHIPMEN26_29_, order0_.STATUS as STATUS27_29_, order0_.STORE_ID as STORE_I40_29_, order0_.STORETYPE_ID as STORETY41_29_, order0_.SUBMITORDERTIME as SUBMITO28_29_, order0_.TEL as TEL29_29_, order0_.TOTAL as TOTAL30_29_, order0_.UNIT as UNIT31_29_, order0_.USER_ID as USER_ID42_29_ from HS_ORDER order0_ where order0_.STATUS=? and order0_.SUBMITORDERTIME<? and order0_.PAYMETHOD_ID=? limit ? 18:22:00.208 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_Worker-1 18:22:00.208 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_Worker-1 18:22:00.209 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_Worker-1 18:22:00.213 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_QuartzSchedulerThread 18:22:00.213 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_QuartzSchedulerThread 18:22:00.215 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_QuartzSchedulerThread 18:22:00.286 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_QuartzSchedulerThread 18:22:00.286 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_Worker-1 18:22:00.290 [schedFactoryBean_Worker-2] DEBUG org.quartz.core.JobRunShell - Calling execute on job DEFAULT.tempOrderSettlementJob 18:22:00.347 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_Worker-2 18:22:00.348 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_Worker-2 18:22:00.348 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_Worker-2 18:22:00.395 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_Worker-2 Hibernate: select dictionary0_.ID as ID1_16_, dictionary0_.CREATEBY as CREATEBY2_16_, dictionary0_.CREATETIME as CREATETI3_16_, dictionary0_.UPDATEBY as UPDATEBY4_16_, dictionary0_.UPDATETIME as UPDATETI5_16_, dictionary0_.CODE as CODE6_16_, dictionary0_.KIND as KIND7_16_, dictionary0_.SORTNO as SORTNO8_16_, dictionary0_.STATUS as STATUS9_16_, dictionary0_.VALUE as VALUE10_16_, dictionary0_.VALUETYPE as VALUETY11_16_ from HS_DICTIONARY dictionary0_ where dictionary0_.CODE=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? Hibernate: select dictionary0_.ID as ID1_16_, dictionary0_.CREATEBY as CREATEBY2_16_, dictionary0_.CREATETIME as CREATETI3_16_, dictionary0_.UPDATEBY as UPDATEBY4_16_, dictionary0_.UPDATETIME as UPDATETI5_16_, dictionary0_.CODE as CODE6_16_, dictionary0_.KIND as KIND7_16_, dictionary0_.SORTNO as SORTNO8_16_, dictionary0_.STATUS as STATUS9_16_, dictionary0_.VALUE as VALUE10_16_, dictionary0_.VALUETYPE as VALUETY11_16_ from HS_DICTIONARY dictionary0_ where dictionary0_.CODE=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=10 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.DELIVERY=1 and order0_.STATUS=10 Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.DELITIME<? and order0_.DELIVERY=2 and order0_.STATUS=15 18:22:42.981 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - MisfireHandler: scanning for misfires... 18:22:43.013 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - Found 0 triggers that missed their scheduled fire-time. Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=10 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.DELIVERY=1 and order0_.STATUS=10 Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.DELITIME<? and order0_.DELIVERY=2 and order0_.STATUS=15 Hibernate: select count(deliveryor0_.ID) as col_0_0_ from DELIVERY_ORDER deliveryor0_ where deliveryor0_.CREATETIME<? and deliveryor0_.STATUS=1 18:23:07.397 [Thread-7] DEBUG o.h.cache.redis.jedis.JedisClient - delete expired cache item in region[hibernate.com.hisun.shop.entity.MallVoucherAssignDetail] expire time=[1469528587396] 18:23:07.440 [Thread-7] DEBUG o.h.cache.redis.jedis.JedisClient - delete expired cache item in region[hibernate.org.hibernate.cache.internal.StandardQueryCache] expire time=[1469528587439] Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=10 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.DELIVERY=1 and order0_.STATUS=10 Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.DELITIME<? and order0_.DELIVERY=2 and order0_.STATUS=15 Hibernate: select count(deliveryor0_.ID) as col_0_0_ from DELIVERY_ORDER deliveryor0_ where deliveryor0_.CREATETIME<? and deliveryor0_.STATUS=1 18:23:42.949 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - MisfireHandler: scanning for misfires... 18:23:42.982 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - Found 0 triggers that missed their scheduled fire-time. 18:23:42.983 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_ClusterManager] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - ClusterManager: Check-in complete.
用maven进行热部署之后,无法访问到tomcat的8080端口
用maven进行热部署成功之后无法访问tomcat的8080端口,如图 ![图片说明](https://img-ask.csdn.net/upload/201803/23/1521809801_129840.png) 但是访问manager却可以访问到,如图![图片说明](https://img-ask.csdn.net/upload/201803/23/1521809827_813393.png)
maven项目部署到云服务器报错
用maven搭建的web项目,本地测试时可运行,但部署到云服务器则访问不了,显示404,路径和服务器配置都没有错,有谁知道是怎么了吗?![图片说明](http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/8.gif)
云服务器上的第二个tomcat启动但是访问不到项目
自己在云服务器上装了第二个tomcat,打算弄个测试环境或者运行第二个小项目,但是启动tomcat之后端口号在listen状态却访问不到项目,防火墙按网上搜索到应该是未开启的,有哪位遇到过或者哪位大神帮忙找找思路么。tomcat中配置端口是8084,配了张图片。![图片说明](https://img-ask.csdn.net/upload/202001/02/1577956708_49977.jpg) 编辑:两个tomcat分别启动并且配置不同端口号试了下,两个tomcat单独启动并且端口是8080的时候是能访问项目的,但是当把一个tomcat端口设置成8084的时候就不能访问了,所以基本上是两个tomcat是部署成功的,并且每个tomcat中的项目是启动了的也能访问,问题就定位到了端口不能访问,或者是其他的有关端口的问题。继续常识解决下端口问题。
怎么maven项目部署之后不能访问servlet?
1.我用的myeclipse,servlet中的是ShowTable.java 在浏览器中能访问src/main/webapp中的index.jsp, 访问路径是http://localhost:8080/magSystem/index.jsp,能够显示出内容; 但是想要用servlet:http://localhost:8080/magSystem/ShowTable却404,还不会报错。。 http://localhost:8080/magSystem/servlet/ShowTable 会显示404并且有错误信息: ``` Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:76) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at com.zkz.magSystem.dao.BaseDAO.getConnection(BaseDAO.java:16) at com.zkz.magSystem.dao.BaseDAO.runSelect(BaseDAO.java:20) at com.zkz.magSystem.servlet.ShowTable.service(ShowTable.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85) at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:132) at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2234) at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2258) at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1319) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:966) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825) ... 31 more ``` 我的其他配置以及目录如下: ## web.xml ``` <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>Archetype Created Web Application</display-name> <servlet> <servlet-name>ShowTable</servlet-name> <display-name>This is the display name of my J2EE component</display-name> <description>This is the description of my J2EE component</description> <servlet-class>com.zkz.magSystem.servlet.ShowTable</servlet-class> </servlet> <servlet-mapping> <servlet-name>ShowTable</servlet-name> <url-pattern>/servlet/ShowTable</url-pattern> </servlet-mapping> </web-app> ``` ## ShowTable.java ``` package com.zkz.magSystem.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.jstl.sql.Result; import com.zkz.magSystem.dao.BaseDAO; @WebServlet("/uploadsevlet") public class ShowTable extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; /** * Constructor of the object. */ public ShowTable() { super(); } /** * Destruction of the servlet. <br> */ public void destroy() { super.destroy(); // Just puts "destroy" string in log // Put your code here } @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub try { Result result = BaseDAO.runSelect("select * from ex1"); request.setAttribute("rows", result.getRows()); request.getRequestDispatcher("index.jsp").forward(request, response); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); response.sendRedirect("error.jsp"); } } /** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ public void init() throws ServletException { // Put your code here } } ``` ## BaseDAO.java ``` package com.zkz.magSystem.dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.PreparedStatement; import java.sql.SQLException; import javax.servlet.jsp.jstl.sql.Result; import javax.servlet.jsp.jstl.sql.ResultSupport; public class BaseDAO { public static Connection getConnection() throws Exception{ Class.forName("com.mysql.jdbc.Driver"); return DriverManager.getConnection("jdbc:mysql://localhost:3306/exam","root","qianmoZONGHENG"); } public static Result runSelect(String sql) throws Exception{ Connection conn = getConnection(); PreparedStatement ps = conn.prepareStatement(sql); ResultSet rs = ps.executeQuery(); //将在线结果集转化为离线结果集 Result result = ResultSupport.toResult(rs); close(conn,ps,rs); return result; } //数据库关闭语句 public static void close(Connection conn, PreparedStatement ps, ResultSet rs) { try { if (rs != null) { rs.close(); rs = null; } if (ps != null) { ps.close(); ps = null; } if (conn != null) { conn.close(); conn = null; } } catch (SQLException se) { se.printStackTrace(); } } } ``` ## index.jsp ``` <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <%@ taglib prefix = "c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <table> <tr> <th>编号</th> <th>姓名</th> <th>电话</th> <th>状态</th> </tr> <c:forEach var="row" items="${rows }"> <tr> <td>${row.id }</td> <td>${row.name }/td> <td>${row.phone }</td> <td>${row.state }</td> </tr> </c:forEach> </table> </body> </html> ``` ![图片说明](https://img-ask.csdn.net/upload/201905/07/1557239537_160797.png) ![图片说明](https://img-ask.csdn.net/upload/201905/07/1557239544_525903.png)
求助:ssm的maven项目tomcat插件启动成功,但是无法访问的问题!
问题描述: springmvc+mybatis项目,tomcat插件成功启动后,访问报404的错误。 个人排查: 1.将其独立部署到tomcat服务器而不用tomcat插件可以成功启动并访问。 2.tomcat插件启动成功后,target下的classes目录下面没有配置文件,但是有class文件。buildpath中已经配置输出文件夹为target/classes,仍然无效。 tomcat插件配置: ``` <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <update>true</update> <!-- 热部署 --> <charset>utf-8</charset> <!-- 设置字符集 --> <uriEncoding>UTF-8</uriEncoding><!-- 设置uri编码 --> <port>8080</port> <!-- 设置端口 --> <path>/</path><!-- 设置默认访问应用的路径 --> </configuration> </plugin> </plugins> ``` 前端控制器配置: ``` <!-- 前端控制器 --> <!-- The front controller of this Spring Web application, responsible for handling all application requests --> <servlet> <servlet-name>springDispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:springmvc/springmvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- Map all requests to the DispatcherServlet for handling --> <servlet-mapping> <servlet-name>springDispatcherServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> ``` controller: ``` @Controller public class UserController { @Autowired private UserService userService; @RequestMapping("/") public String hello() { return "index"; } @RequestMapping("/user") @ResponseBody public List<User> getUserList() { List<User> list = userService.getUserList(); return list; } } ``` 访问url:localhost:8080,正常应该跳转到index.jsp界面,实际输出:`No mapping found for HTTP request with URI [/] in DispatcherServlet with name 'springDispatcherServlet'`。 # 求助!!!
如何更改Idea中Maven项目Tomcat配置后WEBAPP位置
刚开始用IDEA发现创建一个普通Maven项目后,添加web项目,web的文件夹会在SRC外生成 作为一个强迫症我把它移到了src中并改名WEBAPP 在进行CSS美化时一直jquary not found报错 在输出目录里排查发现我创建在webapp下的JS那些文件夹都在contextpath外导致无法访问,只能手动复制进去,请问有没有办法让项目在部署时把位置放对。。![图片说明](https://img-ask.csdn.net/upload/201908/15/1565877743_715510.png)
maven项目打成war包部署到阿里云上,jsp访问跳转没问题,访问后端控制器报404怎么解决?
maven项目打成war包部署到阿里云上,jsp访问跳转没问题,访问后端控制器报404怎么解决? ``` <build> <finalName>ssm-demo</finalName> <pluginManagement> <plugins> <!-- tomcat7插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8080</port> <path>/</path> <uriEncoding>UTF-8</uriEncoding> <server>tomcat7</server> </configuration> </plugin> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.7</version> </plugin> </plugins> </pluginManagement> </build> ```
求大神解决一下,maven项目部署的问题
项目用maven启动,访问没问题,但在别的Tomcat启动后,存在无法跳转页面的问题
maven打war包部署在tomcat webapps目录下启动不报错,就是访问不了
十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server version: Apache Tomcat/7.0.82 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server built: Sep 29 2017 12:23:15 UTC 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server number: 7.0.82.0 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Name: Mac OS X 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Version: 10.13 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Architecture: x86_64 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Version: 1.8.0_144-b01 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Vendor: Oracle Corporation 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_BASE: /Users/wujiawei/apache-tomcat-7.0.82 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_HOME: /Users/wujiawei/apache-tomcat-7.0.82 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.util.logging.config.file=/Users/wujiawei/apache-tomcat-7.0.82/conf/logging.properties 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.endorsed.dirs=/Users/wujiawei/apache-tomcat-7.0.82/endorsed 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.base=/Users/wujiawei/apache-tomcat-7.0.82 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.home=/Users/wujiawei/apache-tomcat-7.0.82 十月 20, 2017 8:48:54 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.io.tmpdir=/Users/wujiawei/apache-tomcat-7.0.82/temp 十月 20, 2017 8:48:54 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/wujiawei/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. 十月 20, 2017 8:48:55 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-8080"] 十月 20, 2017 8:48:55 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-bio-8009"] 十月 20, 2017 8:48:55 下午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 455 ms 十月 20, 2017 8:48:55 下午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 十月 20, 2017 8:48:55 下午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.82 十月 20, 2017 8:48:55 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/docs 十月 20, 2017 8:48:55 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/docs has finished in 204 ms 十月 20, 2017 8:48:55 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/jiaweiwu-0.0.1-SNAPSHOT 十月 20, 2017 8:48:55 下午 org.apache.catalina.startup.TldConfig execute 信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 十月 20, 2017 8:48:55 下午 org.springframework.web.servlet.DispatcherServlet initServletBean 信息: FrameworkServlet 'springmvc': initialization started 十月 20, 2017 8:48:55 下午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh 信息: Refreshing WebApplicationContext for namespace 'springmvc-servlet': startup date [Fri Oct 20 20:48:55 CST 2017]; root of context hierarchy 十月 20, 2017 8:48:56 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from file [/Users/wujiawei/apache-tomcat-7.0.82/webapps/jiaweiwu-0.0.1-SNAPSHOT/WEB-INF/classes/conf/spring-mvc.xml] 十月 20, 2017 8:48:56 下午 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1c19bfce: defining beans [mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,mainController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 十月 20, 2017 8:48:56 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod 信息: Mapped "{[/hi],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String controller.MainController.go() 十月 20, 2017 8:48:56 下午 org.springframework.web.servlet.DispatcherServlet initServletBean 信息: FrameworkServlet 'springmvc': initialization completed in 573 ms 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/jiaweiwu-0.0.1-SNAPSHOT has finished in 1,251 ms 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/manager 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/manager has finished in 35 ms 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/examples 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/examples has finished in 127 ms 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/ROOT 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/ROOT has finished in 21 ms 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/host-manager 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory /Users/wujiawei/apache-tomcat-7.0.82/webapps/host-manager has finished in 23 ms 十月 20, 2017 8:48:56 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-8080"] 十月 20, 2017 8:48:56 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-bio-8009"] 十月 20, 2017 8:48:56 下午 org.apache.catalina.startup.Catalina start 信息: Server startup in 1699 ms
tomcat部署项目报错 工程0 errors了。依赖包也安要求加进去了的
# 问题描述: 首先:自己的新建的简单 maven工程能在tomcat成功部署且可以访问主页。 然后:拷贝的被人的工程放到tomcat上部署后启动报错。困扰几天了,求大神帮帮我~ 有一点说明:tomcat的webapps下有项目文件夹 # _启动日志报错段_: ``` 严重: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/tyLCC]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:742) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1142) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1054) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1586) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:966) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:682) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493) Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2583) at java.lang.Class.getDeclaredFields(Class.java:1916) at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110) at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:267) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:87) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4939) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 38 more Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1104) ... 51 more 十一月 20, 2019 5:50:24 下午 org.apache.catalina.startup.HostConfig deployDirectory 严重: Error deploying web application directory [F:\Tomcat\apache-tomcat-9.0.6\webapps\tyLCC] java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/tyLCC]] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:746) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1142) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1054) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1586) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:966) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:682) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493) ```
maven项目,用到cxf框架,服务器启动后,其中一个server项目访问404错误
环境:eclipse+tomcat7,0+jdk1.6 项目之间有包依赖关系。![图片说明](https://img-ask.csdn.net/upload/201508/21/1440148806_544337.png)上图中圈出来的两个是web项目。 将web项目部署到tomcat服务器之后,在eclipse中启动服务器,此时,后台是没有报错的。只有几个警告: 警告: A docBase E:\Program Files\apache-tomcat-7.0.57\webapps\hb12345_server inside the host appBase has been specified, and will be ignored 2015-8-21 17:31:16 org.apache.catalina.startup.SetContextPropertiesRule begin 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:hb12345_server' did not find a matching property. 2015-8-21 17:31:18 org.apache.tomcat.websocket.server.WsSci onStartup 警告: A docBase E:\Program Files\apache-tomcat-7.0.57\webapps\hb12345_web inside the host appBase has been specified, and will be ignored 2015-8-21 17:31:18 org.apache.catalina.startup.SetContextPropertiesRule begin 警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:hb12345_web' did not find a matching property. 2015-8-21 17:31:18 org.apache.catalina.loader.WebappClassLoader validateJarFile 启动之后,tomcat猫页面可以访问,也可以访问其中的一个项目(hb12345_web)登录页面,但是一登录后台就报错了。 org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - admin, rememberMe=false]. Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException). at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:214) at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106) at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:270) at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:257) at com.eshore.framework.controller.LoginController.login(LoginController.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:662) Caused by: javax.xml.ws.WebServiceException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) at $Proxy81.getUserByAccount(Unknown Source) at com.eshore.framework.authentication.ShiroDbRealm.doGetAuthenticationInfo(ShiroDbRealm.java:98) at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:568) at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180) at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267) at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198) ... 61 more Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://localhost:8080/hb12345_server/ws/sysUserWebservice?wsdl at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1584) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1521) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1429) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:659) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:532) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134) ... 67 more 我看了路径是没有问题的,找不到是哪里的问题了。 直接访问hb12345_server项目页面报错404,后台不报错。 求大神们拯救。
maven项目怎么访问本地图片,或者上传的图片怎么存才方便调用
我把MultipartFile上传的图片写在本地文件夹中,但是在浏览器上不能显示,百度说是安全原因,然后说可以用tomcat的虚拟路径解决, 但是我用的是maven的tomcat插件,不知道怎么找server.xml配置文件,大神们怎么办,一定要用tomcat部署才行吗,或者图片该存在什么地方好,方便调用,我要传一个json,里面有个url要写图片的路径给调用,求大神指点
springboot2.2.1配置https的问题
## 环境 java:&emsp;&emsp;&emsp;&emsp;1.8.0\_231 springboot:&nbsp;&emsp; 2.2.1 内置tomcat:&emsp; 9.0.27 maven:&emsp;&emsp;&emsp;&emsp;3.6.2 idea:&emsp;&emsp;&emsp; 2019.2.4最新版 thymeleaf:&emsp;&emsp;3.0.11 ## 介绍 (两个项目) ### 第一个写了springSecurity和jwt,配置了druid(1.1.2) 按照正常方式配置了https,实现了http转https, ![配置文件](https://img-ask.csdn.net/upload/201911/20/1574250462_832231.png) ![http转https](https://img-ask.csdn.net/upload/201911/20/1574250506_961687.png) 项目启动正常,日志输出没有问题,访问页面,报错了 `ERROR logging.DirectJDKLog *log #175 -- Error running socket processor java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending(J)I` ![图片说明](https://img-ask.csdn.net/upload/201911/20/1574249418_332121.png) ### 第二个项目 只写了一个简单的页面,没有其余的任何没用的东西,同样启动没有问题,访问页面报一样的错 ![图片说明](https://img-ask.csdn.net/upload/201911/20/1574249817_869827.png) 推测是tomcat版本问题,把springboot换成2.1.0,内置tomcat变成9.0.12,访问正常 又查到相关的话题是tomcat的tomcat-native版本问题,但是得不到更多的有用信息,也不知道怎么换版本。 对了,期间使用了外置的tomcat9.0.12,启动访问都没有问题,之前修改了tomcat的server.xml,配置成http转https,修改了web.xml,加了一些标签,如图。 ![图片说明](https://img-ask.csdn.net/upload/201911/20/1574251125_261342.png) 之后又使用了外置的tomcat9.0.27部署,访问正常。 ## 总结 springboot2.2.1,内置tomcat9.0.27,访问失败 springboot2.1.0,内置tomcat9.0.12,访问成功 springboot2.2.1和springboot2.1.0,外置tomcat,访问成功 推测是tomcat的web.xml配置的那几行标签起了作用,但是不敢妄断。 (空一行,以示敬重) 前辈们,咋办呢?? <br/><br/><br/>又试了一下,去掉外部tomcat9.0.27的web.xml的配置也可以正常运行,内置的相同版本不行,是不是找问题的方向错了,其他东西都没有配置,不一样的就是内部web.xml是通过ServletWebServerFactory设置的,但是设置成功了啊,http可以跳转到https。。。。。。。。。 <br/> 望大佬指点????
我在开源社区下载了一个权限系统的maven工程,但是遇到的问题无法解决
我先说一下我的工作环境: eclipse10,maven3.3.1,jdk1.7,Tomcat7,数据库用的是mysql 项目下载网址:https://github.com/Jdoing/myweb 博客网址:http://lib.csdn.net/article/java/2933 我刚下载的时候还不能直接部署到Tomcat7,后来我就把导入的maven项目转成web项目了,可以成功部署了,但是却遇到了下面几个问题: 1、我把导入的项目转成web项目,但是很多js插件报错,而且经常跳出下面这个错误Errors occurred during the build.Errors running builder 'Maven Project Builder' on project 'myweb'.8194 2、我用maven install打包的时候出现错误,有可能是第一个错误引起的,导致无法打成war包 3、第一次接触maven项目,不知道具体本地访问项目组jsp页面的访问路径。 本人小白,第一次接触maven项目,遇到问题百度了好久都没有解决,所以在这里向各位大神求助,谢谢。
sso单点登录访问出错求助
我在GitHub上下了一个demo,然后导入idea中,部署到本地的Tomcat服务器中,然后不知道该怎么访问,各种访问路径都试过了,还是访问失败 项目有一个父工程和四个自工程,包括一个客户端、服务端、两个系统服务端
刚学ssm框架纯小白,使用了idea的进行web项目部署的时候遇到发布失败!
项目tomcat启动没有问题![图片说明](https://img-ask.csdn.net/upload/201708/16/1502852608_83166.png) localhost:8080也能访问(默认启动的是index.jsp)![图片说明](https://img-ask.csdn.net/upload/201708/16/1502852674_668355.png) 我用的工maven![图片说明](https://img-ask.csdn.net/upload/201708/16/1502852911_462016.png), 但是进行web项目部署的时候遇到发布失败![图片说明](https://img-ask.csdn.net/upload/201708/16/1502852790_981167.png) 报错HTTP Status [404] – [Not Found] Type Status Report Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/8.5.15 源码 配置 都是跟着视频写的 没有问题。求高手搭救。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
redis分布式锁,面试官请随便问,我都会
文章有点长并且绕,先来个图片缓冲下! 前言 现在的业务场景越来越复杂,使用的架构也就越来越复杂,分布式、高并发已经是业务要求的常态。像腾讯系的不少服务,还有CDN优化、异地多备份等处理。 说到分布式,就必然涉及到分布式锁的概念,如何保证不同机器不同线程的分布式锁同步呢? 实现要点 互斥性,同一时刻,智能有一个客户端持有锁。 防止死锁发生,如果持有锁的客户端崩溃没有主动释放锁,也要保证锁可以正常释...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法和技巧,包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等,会持续更新......
YouTube排名第一的励志英文演讲《Dream(梦想)》
Idon’t know what that dream is that you have, I don't care how disappointing it might have been as you've been working toward that dream,but that dream that you’re holding in your mind, that it’s po...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Java世界最常用的工具类库
Apache Commons Apache Commons有很多子项目 Google Guava 参考博客
相关热词 c# 图片上传 c# gdi 占用内存 c#中遍历字典 c#控制台模拟dos c# 斜率 最小二乘法 c#进程延迟 c# mysql完整项目 c# grid 总行数 c# web浏览器插件 c# xml 生成xsd
立即提问