在IntelliJ IDEA上使用Maven创建SpringMVC项目--上传文件

图片说明
图片说明
![图片说明](https://img-ask.csdn.net/upload/201808/14/1534219260_816356.png)<br>
图片说明
不知道是哪里出了错。。。

2个回答

排查下是不是 jar 包版本的问题

是不是fileUtils引用错类了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
在IntelliJ IDEA上使用Maven创建SpringMVC项目
![图片说明](https://img-ask.csdn.net/upload/201808/07/1533630442_830388.png) 连创建都创建不了,这是什么问题?应该怎样解决呢?
怎么用idea创建maven的springmvc
选择maven然后webapp那种我知道。 我说的是: ![我的](https://img-ask.csdn.net/upload/201903/04/1551700204_593366.png)![我的](https://img-ask.csdn.net/upload/201903/04/1551700216_721407.png) 我这样创建的并不是maven文件。 我看视频上也是这样创建但他创建的就是maven文件 ![视频教程](https://img-ask.csdn.net/upload/201903/04/1551700427_592561.png)![视频教程](https://img-ask.csdn.net/upload/201903/04/1551700439_492406.png)
springmvc intelliJ IDEA Multiple root tags
如题:![图片说明](https://img-ask.csdn.net/upload/201901/10/1547132790_460979.png)怎么回事,请高手回答!
使用idea创建项目发生的问题?
使用idea创建一个非maven的Springmvc项目![图片说明](https://img-ask.csdn.net/upload/202003/29/1585466818_545268.png) ![图片说明](https://img-ask.csdn.net/upload/202003/29/1585466850_417047.png) 不做修改,直接finish,然后idea开始自动下载。 ![图片说明](https://img-ask.csdn.net/upload/202003/29/1585467009_331420.png) 一段时间后下载出现问题,弹出对话框。 在此请教大佬,出现这种情况是因为什么?如何解决?
intellij idea导入eclipse创建的maven web项目 jar包导入总是报错
** 软件环境**: spring+springMVC+mybatis+ mysql; tomcat服务器; maven项目 eclipse工具运行正常; **问题描述:** maven的jar包依赖没有导入成功,maven配置正常 沿用了阿里云的中心库eclipse可用; 报错截图1: ![图片说明](https://img-ask.csdn.net/upload/201811/12/1542032523_181718.png) ``` nformation:java: Errors occurred while compiling module 'miaolanghzong' Information:Eclipse compiler 4.7.2 was used to compile java sources Information:2018/11/12 21:56 - Compilation completed with 133 errors and 418 warnings in 29 s 620 ms D:\career\workspaceTest2\erzhentang\src\main\java\com\app\totalController\MemberBusinessController.java Error:Error:line (1)java: Syntax error on token "Invalid Character", delete this token Error:Error:line (13)java: The import javax.servlet.http.HttpServletRequest cannot be resolved Error:Error:line (14)java: The import javax.servlet.http.HttpServletResponse cannot be resolved Error:Error:line (47)java: The import com.google.gson cannot be resolved Error:Error:line (659)java: HttpServletRequest cannot be resolved to a type Error:Error:line (659)java: HttpServletResponse cannot be resolved to a type Error:Error:line (623)java: HttpServletRequest cannot be resolved to a type Error:Error:line (623)java: HttpServletResponse cannot be resolved to a type Error:Error:line (894)java: HttpServletRequest cannot be resolved to a type Error:Error:line (894)java: HttpServletResponse cannot be resolved to a type Error:Error:line (806)java: HttpServletRequest cannot be resolved to a type Error:Error:line (806)java: HttpServletResponse cannot be resolved to a type Error:Error:line (198)java: HttpServletRequest cannot be resolved to a type Error:Error:line (198)java: HttpServletResponse cannot be resolved to a type Error:Error:line (277)java: HttpServletRequest cannot be resolved to a type Error:Error:line (277)java: HttpServletResponse cannot be resolved to a type Error:Error:line (134)java: HttpServletRequest cannot be resolved to a type Error:Error:line (134)java: HttpServletResponse cannot be resolved to a type Error:Error:line (460)java: HttpServletRequest cannot be resolved to a type Error:Error:line (460)java: HttpServletResponse cannot be resolved to a type Error:Error:line (540)java: HttpServletRequest cannot be resolved to a type Error:Error:line (540)java: HttpServletResponse cannot be resolved to a type Error:Error:line (109)java: HttpServletRequest cannot be resolved to a type Error:Error:line (109)java: HttpServletResponse cannot be resolved to a type Error:Error:line (411)java: HttpServletRequest cannot be resolved to a type Error:Error:line (411)java: HttpServletResponse cannot be resolved to a type Warning:Warning:line (114)java: The static method sendCode(java.lang.String) from the type com.app.util.Alidayu should be accessed in a static way Warning:Warning:line (154)java: The static method md5Encode(java.lang.String) from the type com.app.util.MD5Util should be accessed in a static way Warning:Warning:line (207)java: The static method md5Encode(java.lang.String) from the type com.app.util.MD5Util should be accessed in a static way Warning:Warning:line (286)java: The static method md5Encode(java.lang.String) from the type com.app.util.MD5Util should be accessed in a static way Warning:Warning:line (421)java: The static method md5Encode(java.lang.String) from the type com.app.util.MD5Util should be accessed in a static way Warning:Warning:line (469)java: The static method md5Encode(java.lang.String) from the type com.app.util.MD5Util should be accessed in a static way Warning:Warning:line (549)java: The static method md5Encode(java.lang.String) from the type com.app.util.MD5Util should be accessed in a static way D:\career\workspaceTest2\erzhentang\src\main\java\com\app\common\LoginFilter.java Error:Error:line (23)java: Filter cannot be resolved to a type Error:Error:line (37)java: ServletException cannot be resolved to a type Error:Error:line (36)java: ServletRequest cannot be resolved to a type Error:Error:line (36)java: ServletResponse cannot be resolved to a type Error:Error:line (37)java: FilterChain cannot be resolved to a type Error:Error:line (106)java: ServletException cannot be resolved to a type Error:Error:line (106)java: FilterConfig cannot be resolved to a type Error:Error:line (7)java: The import javax.servlet.Filter cannot be resolved Error:Error:line (8)java: The import javax.servlet.FilterChain cannot be resolved Error:Error:line (9)java: The import javax.servlet.FilterConfig cannot be resolved Error:Error:line (10)java: The import javax.servlet.ServletException cannot be resolved Error:Error:line (11)java: The import javax.servlet.ServletRequest cannot be resolved Error:Error:line (12)java: The import javax.servlet.ServletResponse cannot be resolved Error:Error:line (13)java: The import javax.servlet.http.HttpServletRequest cannot be resolved Error:Error:line (14)java: The import javax.servlet.http.HttpServletResponse cannot be resolved Error:Error:line (15)java: The import javax.servlet.http.HttpSession cannot be resolved Error:Error:line (24)java: FilterConfig cannot be resolved to a type Warning:Warning:line (26)java: java.util.List is a raw type. References to generic type java.util.List<E> should be parameterized Warning:Warning:line (28)java: java.util.List is a raw type. References to generic type java.util.List<E> should be parameterized Error:Error:line (33)java: FilterConfig cannot be resolved to a type Error:Error:line (39)java: HttpServletRequest cannot be resolved to a type Error:Error:line (39)java: HttpServletRequest cannot be resolved to a type Error:Error:line (40)java: HttpServletResponse cannot be resolved to a type Error:Error:line (40)java: HttpServletResponse cannot be resolved to a type Error:Error:line (41)java: HttpSession cannot be resolved to a type Error:Error:line (107)java: FilterConfig cannot be resolved to a type Error:Error:line (108)java: FilterConfig cannot be resolved to a type Error:Error:line (113)java: FilterConfig cannot be resolved to a type D:\career\workspaceTest2\erzhentang\src\main\java\com\app\dao\impl\MemberDaoImpl.java Warning:Warning:line (42)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized Warning:Warning:line (63)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized Warning:Warning:line (110)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized Warning:Warning:line (9)java: The import com.app.bean.Menu is never used D:\career\workspaceTest2\erzhentang\src\main\java\com\app\dao\impl\EarProblemDaoImpl.java Warning:Warning:line (18)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized Warning:Warning:line (48)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized D:\career\workspaceTest2\erzhentang\src\main\java\com\app\dao\impl\BodyConclusionDaoImpl.java Warning:Warning:line (25)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized Warning:Warning:line (11)java: The import com.app.bean.BodyConclusionWuxing is never used D:\career\workspaceTest2\erzhentang\src\main\java\com\app\dao\mapper\EarDisease100Mapper.java Warning:Warning:line (14)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized D:\career\workspaceTest2\erzhentang\src\main\java\com\app\dao\BlueToochMacDao.java Warning:Warning:line (12)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized Warning:Warning:line (14)java: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized D:\career\workspaceTest2\erzhentang\src\main\java\com\app\dao\EarScanC ``` ![图片说明](https://img-ask.csdn.net/upload/201811/12/1542031436_513761.png) ![图片说明](https://img-ask.csdn.net/upload/201811/12/1542031687_784746.png) ![图片说明](https://img-ask.csdn.net/upload/201811/12/1542031723_457809.png) ![图片说明](https://img-ask.csdn.net/upload/201811/12/1542031745_434340.png) ![图片说明](https://img-ask.csdn.net/upload/201811/12/1542031762_172605.png) ![图片说明](https://img-ask.csdn.net/upload/201811/12/1542031776_649119.png)
Maven依赖搭建的SpringMVC项目通过<mvc: resources mapping="" location="" />配置无法访问静态资源
项目环境:JDK1.8;SpringMVC4.3.18;阿里云Maven3.3.9 1. web.xml配置 ``` <servlet> <servlet-name>spring_mvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:resources/dispatcher-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring_mvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> ``` 1. dispatcher-servlet.xml配置 ``` <mvc:annotation-driven /> <!-- 处理静态资源访问 --> <!--<mvc:default-servlet-handler />--> <mvc:resources mapping="/css/**" location="/static/css/" /> <mvc:resources mapping="/images/**" location="/static/images/" /> <mvc:resources mapping="/js/**" location="/static/js/" /> ``` 1. 页面引用 ![图片说明](https://img-ask.csdn.net/upload/201910/31/1572536011_669711.png) 1. 页面访问 ![图片说明](https://img-ask.csdn.net/upload/201910/31/1572536042_799759.png) 1. 项目结构: ![图片说明](https://img-ask.csdn.net/upload/201910/31/1572536070_773804.png) 1. Spring相关包引用 ![图片说明](https://img-ask.csdn.net/upload/201910/31/1572536093_691501.png) 本人在网上查询了很多方法,都说使用<mvc: resources .../>这个映射需要在其前面加上<mvc: annotation-driven />。但是我的项目里一开始配置springmvc的时候就已经有annotation-driven这个注解了,仍然无法访问静态资源。很是纳闷。然而使用<mvc: default-servlet-handler />这个注解就可以访问静态资源。再次发出问题,主要是想解决为什么annotation-driven这个注解不起作用,希望有过类似经验或者知道的朋友指导一下,甚是感激。小白,暂时没有币,还望不介意。
maven 依赖 用 tomcat7-maven插件 run运行时报错 求解决
tomcat7 用maven依赖插件 运行报错 //项目框架 spring+springmvc ![图片说明](https://img-ask.csdn.net/upload/201908/08/1565260003_595830.png) //目录结构 ![图片说明](https://img-ask.csdn.net/upload/201908/08/1565260208_492937.png) //web.xml ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>ss1</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <!-- SpringSecurity过滤器链 名字一定要叫做springSecurityFilterChain 是她内置的 --> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <!--/*代表拦截所有资源--> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 启动Spring --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:applicationContext.xml classpath:spring-security.xml </param-value> </context-param> <!--启动SpringMVC--> <servlet> <servlet-name>ss1</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:springmvc.xml</param-value> </init-param> <!-- 服务器启动加载Servlet 默认第一次访问启动--> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>ss1</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app> ``` //pom.xml ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>cn.ruanlam</groupId> <artifactId>02.spring-security</artifactId> <version>1.0-SNAPSHOT</version> <modules> <module>../02.springsecurity</module> </modules> <packaging>pom</packaging> <url>http://www.example.com</url> <properties> <jdk.version>1.8</jdk.version> <spring.version>4.3.10.RELEASE</spring.version> <spring.security.version>4.2.3.RELEASE</spring.security.version> <jstl.version>1.2</jstl.version> <servlet.version>2.5</servlet.version> </properties> <dependencies> <!-- Spring dependencies --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <!-- Spring Security --> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>${spring.security.version}</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>${spring.security.version}</version> </dependency> <!-- jstl for jsp page --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>${jstl.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${servlet.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.5</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> <!-- jdk版本插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> <showWarnings>true</showWarnings> </configuration> </plugin> <!-- tomcat7插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8080</port> <path>/ss1</path> <server>tomcat7</server> <uriEncoding>UTF-8</uriEncoding> </configuration> </plugin> </plugins> </build> </project> ``` //报错内容 ``` D:\career\Java\jdk1.8.0_152\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\career\workspaceTest\02.springsecurity -Dmaven.home=D:\career\Java\apache-maven-3.6.0 -Dclassworlds.conf=D:\career\Java\apache-maven-3.6.0\bin\m2.conf "-javaagent:D:\career\JetBrains\IntelliJ IDEA 2018.2.1\lib\idea_rt.jar=65491:D:\career\JetBrains\IntelliJ IDEA 2018.2.1\bin" -Dfile.encoding=UTF-8 -classpath D:\career\Java\apache-maven-3.6.0\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2018.2.1 -s D:\career\Java\apache-maven-3.6.0\conf\settings.xml org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Child module D:\career\workspaceTest\02.springsecurity\pom.xml of D:\career\workspaceTest\02.springsecurity\pom.xml forms aggregation cycle D:\career\workspaceTest\02.springsecurity\pom.xml -> D:\career\workspaceTest\02.springsecurity\pom.xml @ @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project cn.ruanlam:02.spring-security:1.0-SNAPSHOT (D:\career\workspaceTest\02.springsecurity\pom.xml) has 1 error [ERROR] Child module D:\career\workspaceTest\02.springsecurity\pom.xml of D:\career\workspaceTest\02.springsecurity\pom.xml forms aggregation cycle D:\career\workspaceTest\02.springsecurity\pom.xml -> D:\career\workspaceTest\02.springsecurity\pom.xml [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException Process finished with exit code 1 ``` //最终已解决 pom.xml 标签packaging里面改成war ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>cn.ruanlam</groupId> <artifactId>02.spring-security</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>rVideos</name> <url>http://maven.apache.org</url> <properties> <jdk.version>1.8</jdk.version> <spring.version>4.3.10.RELEASE</spring.version> <spring.security.version>4.2.3.RELEASE</spring.security.version> <jstl.version>1.2</jstl.version> <servlet.version>2.5</servlet.version> </properties> <dependencies> <!-- Spring dependencies --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <!-- Spring Security --> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>${spring.security.version}</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>${spring.security.version}</version> </dependency> <!-- jstl for jsp page --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>${jstl.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${servlet.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.5</version> </dependency> <!-- JSON lib 开发包 以及它的依赖包 --> <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <classifier>jdk15</classifier> <version>2.4</version> </dependency> <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.8.3</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>net.sf.ezmorph</groupId> <artifactId>ezmorph</artifactId> <version>1.0.5</version> </dependency> <!--mybaits相关依赖--> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.4</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.1.7</version> </dependency> <!--mysql的驱动--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.41</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <!--jdbc依赖--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.5</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>RELEASE</version> <scope>compile</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> <!-- jdk版本插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> <showWarnings>true</showWarnings> </configuration> </plugin> <!-- tomcat7插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>8080</port> <path>/ss2</path> <server>tomcat7</server> <uriEncoding>UTF-8</uriEncoding> </configuration> </plugin> </plugins> <!-- idea不会自动把xml配置文件加载到target里面--> <resources> <resource> <directory>${basedir}/src/main/resource</directory> <includes> <!--<include>**/*.xml</include>--> <include>**/*.*</include> </includes> </resource> </resources> <!-- <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.*</include> </includes> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources>--> </build> </project> ```
Maven工程的web项目,项目的绝对路径不在Maven工程的target目录下,反而在tomcat服务器的路径下
本人是在学习SpringMVC文件上传时遇到的问题 ``` String path =request.getServletContext().getRealPath("/uploads"); System.out.println(path); ``` 代码如上述所示,但是此处的path所指的路径并不在Maven工程的target文件夹下,反而在tomcat服务器上,导致每次重启服务器,该文件夹都会被删除重新创建,难道是我idea中的配置有问题?搜了许久也没找到相关答案。 下面时idea中的配置截图: ![图片说明](https://img-ask.csdn.net/upload/201910/03/1570089640_941056.png)
idea创建的项目没有out文件夹
idea下用maven构建的web项目 为什么没有out文件夹呢?只有一个target。 我用springmvc 做了个文件上传功能,上传到tomcat服务器,在idea中项目启动文件就被上传到了target中,但是我在网页又访问不了target中的文件资源。 我旁边的同事项目有out文件夹,他上传的文件,直接上传到了out文件夹,而不是target,idea启动tomcat就可以直接访问了,我的为什么传到了target中,而且无法访问里面的文件资源。 求解。
springMVC的bean注入异常org.springframework.beans.factory.BeanCreationException: Error creating bean with name "xxx"
以下是相关代码,请问除了这些还有哪里有问题? 这些代码是从一个能正常运行的项目中粘过来的,只改了项目名别的都没动 (springMVC项目,jdk1.8) · app.xml中的扫包配置 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585308087_677047.png) · controller层注解 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585308178_636463.png) · pom文件中的配置 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585308227_556743.png) · service层注解 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585308260_503913.png) · web.xml中的配置 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585308301_622538.png) · 前台静态资源报错 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585308328_886445.png) · 后台报BeanCreationException异常 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585308368_559542.png) 配置文件中配置的包或文件按住Ctrl键都能正确跳过去 请问还哪里有问题?????????
springMVC返回页面会丢失项目名
自学的ssm框架,试着搭建的时候发现 ![图片说明](https://img-ask.csdn.net/upload/201911/26/1574734763_299559.jpg) ctrl+左键无法点进return的页面 后来测试的时候点击超链接返回的页面是404 ![图片说明](https://img-ask.csdn.net/upload/201911/26/1574734944_913540.jpg) 检查后发现路径中缺少项目名,把项目名加上后可以正常访问 开始的代码如下 ``` <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>首页</title> </head> <body> <h3>测试</h3> <a href="/item/jump">springMVC跳转测试</a> </body> </html> ``` 后来修改之后 ``` <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>首页</title> </head> <body> <h3>测试</h3> <a href="item/jump">springMVC跳转测试</a> </body> </html> ``` 将/item/jump的/去掉以后发现可以正常跳转,想问下大佬们到底是怎么回事,还有我单独配置spring-MVC框架的时候在controller是可以ctrl+左键点进返回的页面的为什么现在又不行了?是视图解析器配置的问题吗 配置文件代码如下 spring-MVC.xml ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <!--开启注解--> <mvc:annotation-driven/> <!--注解扫描,只扫描controller--> <context:component-scan base-package="com.ryn.CardDraw.*.controller" use-default-filters="false"> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!--配置视图解析器--> <bean id="internalResourceViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/pages/"/> <property name="suffix" value=".jsp"/> </bean> <!--静态资源过滤--> <mvc:default-servlet-handler/> </beans> ``` 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>spring-mvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring/spring-MVC.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring-mvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <session-config> <session-timeout>15</session-timeout> </session-config> </web-app> ``` jsp文件的目录 ![图片说明](https://img-ask.csdn.net/upload/201911/26/1574735237_997859.jpg) 希望各位大佬能帮小弟指点迷津,谢谢了!!
ssm框架demo遇到的问题
各位老哥们大家好,我是一名大二学生,自学Java一年半了,进步很慢,在ssm框架上遇到了问题,认识的人少,这个问题没人指点我,我很难再往后学习。 下面描述一下我遇到的问题吧:我比较抵触写jsp,所以从javaweb开始就尝试前后端分离,在学习ssm框架时,讲师用的都是jsp,我以为只要把springmvc的视图解析器中suffix配置成.html就行了,事情却没那么简单,项目一运行就报404,按理应该默认去找index.html,但是却直接报错,希望老哥们给我分析一下我哪里有错误。希望前辈能指导一下,谢谢了 ## 1:创建项目,我用的是IDEA,创建时选择的是Maven的webapp骨架。 ## 2:导入pom依赖 ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>war</packaging> <name>register</name> <groupId>xyz.peterparker</groupId> <artifactId>register</artifactId> <version>1.0-SNAPSHOT</version> <build> <plugins> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.7</version> <configuration> <connectors> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> <port>8888</port> <maxIdleTime>30000</maxIdleTime> </connector> </connectors> <webAppSourceDirectory>${project.build.directory}/${pom.artifactId}-${pom.version} </webAppSourceDirectory> <contextPath>/</contextPath> </configuration> </plugin> </plugins> </build> <properties> <spring.version>5.2.1.RELEASE</spring.version> <slf4j.version>1.6.6</slf4j.version> <log4j.version>1.2.12</log4j.version> <mybatis.version>3.4.5</mybatis.version> </properties> <dependencies> <!--dependency> <groupId>xyz.peterparker</groupId> <artifactId>[the artifact id of the block to be mounted]</artifactId> <version>1.0-SNAPSHOT</version> </dependency--> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.6.8</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <!-- log start --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> </dependency> <!-- log end --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <dependency> <groupId>c3p0</groupId> <artifactId>c3p0</artifactId> <version>0.9.1.2</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>javax.annotation</groupId> <artifactId>jsr250-api</artifactId> <version>1.0</version> </dependency> <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.16</version> </dependency> </dependencies> </project> ``` ## 3:创建包结构 ![图片说明](https://img-ask.csdn.net/upload/202002/19/1582083667_469404.png) ## 4:编写web.xml ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <!-- 更改applicationContext的默认位置 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <!-- 配置监听器 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <!-- 配置前端控制器 --> <servlet> <servlet-name>dispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:springmvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcherServlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <!-- 配置解决中文乱码的过滤器 --> <filter> <filter-name>characterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>characterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app> ``` ## 5:编写applicationContext.xml ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <!-- 扫描service和dao --> <context:component-scan base-package="dao" /> <context:component-scan base-package="service" /> <!-- 引入dataSource.properties --> <context:property-placeholder location="classpath:dataSource.properties" /> <!-- 配置数据库连接池 --> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="${driverClass}" /> <property name="jdbcUrl" value="${jdbcUrl}" /> <property name="user" value="${user}" /> <property name="password" value="${password}" /> </bean> <!-- 配置SqlSessionFactoryBean --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> </bean> <!-- 配置扫描dao --> <bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="dao" /> </bean> <!-- 配置声明式事务管理 --> <bean id="dataSourceTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <tx:annotation-driven transaction-manager="dataSourceTransactionManager" /> </beans> ``` ## 6:编写dataSource.properties ``` driverClass=com.mysql.cj.jdbc.Driver jdbcUrl=jdbc:mysql://localhost/user?useSSL=false&serverTimezone=Asia/Shanghai user=root password=rhw19990625 ``` ## 7:编写springmvc.xml ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"> <!-- 配置扫描controller --> <context:component-scan base-package="controller" /> <!-- 配置视图解析器 --> <bean id="internalResourceViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="pages" /> <property name="suffix" value=".html" /> <property name="contentType" value="text/html" /> </bean> <mvc:annotation-driven /> <mvc:default-servlet-handler /> <aop:aspectj-autoproxy proxy-target-class="true"/> </beans> ``` ## 8:编写User实体类 ``` package domain; import java.io.Serializable; public class User implements Serializable { private String username; private Integer tel; private String password; public User() { } public User(String username, Integer tel, String password) { this.username = username; this.tel = tel; this.password = password; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public Integer getTel() { return tel; } public void setTel(Integer tel) { this.tel = tel; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } } ``` ## 9:编写dao层接口UserDao ``` package dao; import domain.User; import org.apache.ibatis.annotations.Insert; import org.springframework.stereotype.Repository; @Repository public interface UserDao { @Insert("insert into user values(#{username},#{tel},#{password})") void insert(User user); } ``` ## 10:编写service层接口UserService ``` package service; import domain.User; public interface UserService { void insert(User user); } ``` ## 11:编写service层实现类UserServiceImpl ``` package service.impl; import dao.UserDao; import domain.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import service.UserService; @Service public class UserServiceImpl implements UserService { @Autowired private UserDao userDao; public void insert(User user) { userDao.insert(user); } } ``` ## 12:编写Controller类UserController ``` package controller; import com.sun.codemodel.internal.JMethod; import domain.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import service.UserService; @Controller @RequestMapping("user") public class UserController { @Autowired private UserService userService; @ResponseBody @RequestMapping(value = "register" ,method = RequestMethod.POST) public String insert(User user){ userService.insert(user); return "success"; } } ``` ## 13:编写index.html ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Register</title> </head> <body> <form action="/user/register" method="post"> <input type="text" name="username"> <input type="text" name="tel"> <input type="password" name="password"> <input type="submit"> </form> </body> </html> ``` ## 14:编写pages文件夹下的success.html ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Success</title> </head> <body> <h3>Success!...</h3> </body> </html> ```
SpringMvc中使用json报错415:源服务器拒绝服务请求,因为有效负载的格式在目标资源上此方法不支持。
已经导入了jackson依赖 ``` <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.9</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.9.9</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.9.9</version> </dependency> ``` 简单java类 ``` public class item implements Serializable { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public item(String name) { this.name = name; } } ``` 控制器类 ``` @RequestMapping(path = "/testAjax",method = RequestMethod.POST) @ResponseBody public void testAjax(@RequestBody item test){ System.out.println("testAjax方法执行了....."); System.out.println(test); } ``` ajax请求 ``` $.ajax({ url:"/test/testAjax", contentType:"application/json;charset=UTF-8", data:JSON.stringify({"name":"shadow"}), dataType:"json", type:"POST", success:function (data) { alert("username"+ data.name); }, }); ```
SpringMVC多模块下JUnit4单元测试@ContextConfiguration的路径问题
##@ContextConfiguration导入配置文件的相关问题 1.问题描述 项目用了SpringMVC的多模块,配置文件放在pmp-web模块下src/main/resources下 ![img](http://temp.muramasa.club/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190912144915.png) 现在在pmp-requeirement模块中的想导入SpringMVC的配置文件 ![img](http://temp.muramasa.club/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190912145421.png) 根据网上的导入方式,可是找不到该配置文件,配置方式如下 ![img](http://temp.muramasa.club/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190912150137.png)
spring整合使用mybatis的接口,但使用时显示在spring容器内找不到dao的接口对象。
本来已经整合了spring和springmvc,然后我再添加了mybatis的依赖,数据库的配置等等。在test类里mybatis可以单独运作。但是和spring整合的时候就出现问题. 这是我的目录结构 ![图片说明](https://img-ask.csdn.net/upload/202002/11/1581431166_377484.png) 我的dao中的类如下 ``` @Repository public interface IAccountDao { @Select("select * from account") List<Account> findAll(); @Insert("insert into account(name,money) values (#{name},#{money})") void saveAccount(Account account); } ``` service中的类如下 ``` @Service("accountService") public class AccountServiceImpl implements IAccountService { @Autowired private IAccountDao accountDao; @Override public List<Account> findAll() { System.out.println("findAll_service"); return accountDao.findAll(); } @Override public void saveAccount(Account account) { System.out.println("saveAccount_service"); accountDao.saveAccount(account); } } ``` 而且我的spring的配置文件已经按照教程中那样引入了mybatis的工厂什么的 ``` <?xml version="1.0" encoding="UTF-8"?> <beans 一堆约束省略了> <context:component-scan base-package="com.HSY"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!-- 整合Mybatis--> <!-- 配置C3P0的连接池对象 --> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/ssm" /> <property name="username" value="root" /> <property name="password" value="123456" /> </bean> <!-- 配置SqlSession的工厂 --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> </bean> <!-- 配置扫描dao的包--> <bean id="mapperScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="com.HSY.dao"/> </bean> </beans> ``` SqlMapConfig的数据库配置也配了,但是最后仍然报错 ``` beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.HSY.dao.IAccountDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} ``` 请问大神们怎么解决
求各位大神看看 SpringMVC实现从数据库导出Exlce 并在前端实现下载 运行项目 点击下载出现了以下异常
SpringMVC实现从数据库导出Exlce 并在前端实现下载 运行项目 点击下载出现了以下异常 ![图片说明](https://img-ask.csdn.net/upload/201906/14/1560498771_997741.png) 后端代码 ![图片说明](https://img-ask.csdn.net/upload/201906/14/1560498874_655810.png) ![图片说明](https://img-ask.csdn.net/upload/201906/14/1560499067_286873.png)
Idea启动tomcat发布项目失败
"D:\Program Files\apache-tomcat-7.0.0\bin\catalina.bat" run [2015-10-16 12:41:39,170] Artifact itcast-springmvc:war exploded: Server is not connected. Deploy is not available. Using CATALINA_BASE: "C:\Users\.IntelliJIdea12\system\tomcat\Unnamed_IdeaJworkspace" Using CATALINA_HOME: "D:\Program Files\apache-tomcat-7.0.0" Using CATALINA_TMPDIR: "D:\Program Files\apache-tomcat-7.0.0\temp" Using JRE_HOME: "D:\java\jdk1.7.0_51" Using CLASSPATH: "D:\Program Files\apache-tomcat-7.0.0\bin\bootstrap.jar;D:\Program Files\apache-tomcat-7.0.0\bin\tomcat-juli.jar" Listening for transport dt_socket at address: 9998 十月 16, 2015 12:41:40 上午 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\java\jdk1.7.0_51\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;D:\IntelliJ IDEA 12.1.7\bin\..\.\bin;C:\windows\system32;C:\windows;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\VC6.0\Tools\WinNT;D:\VC6.0\MSDev98\Bin;D:\VC6.0\Tools;D:\VC98\bin;C:\Program Files (x86)\DBank\ClickUp;D:\java\jdk1.7.0_51\bin;D:\OracleInstantClient\instantclient_12_1;%MAVEN_HOME%\bin;%JAVA_HOME/bin%;%CXF_HOME%/bin;D:\carlibre\;D:\CRT\;D:\TortoiseSVN\bin;%MYSQL_HOME%;D:\Program Files\apache-tomcat-7.0.0;D:\VC6.0\Tools\WinNT;D:\VC6.0\MSDev98\Bin;D:\VC6.0\Tools;D:\VC98\bin;C:\Program Files (x86)\DBank\ClickUp;D:\java\jdk1.7.0_51\bin;D:\OracleInstantClient\instantclient_12_1;D:\Program Files\Maven\apache-maven-3.2.3\bin;%JAVA_HOME/bin%;D:\apache-cxf-3.0.2/bin;D:\Program Files\apache-tomcat-7.0.0/bin;D:\Redis;D:\Program Files\MySql Server\bin;;d:\intellij idea 12.1.7\jre\jre\bin;. 十月 16, 2015 12:41:40 上午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 885 ms 十月 16, 2015 12:41:40 上午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 十月 16, 2015 12:41:40 上午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.0 十月 16, 2015 12:41:40 上午 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-80 十月 16, 2015 12:41:40 上午 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-80 十月 16, 2015 12:41:40 上午 org.apache.coyote.ajp.AjpProtocol init 信息: Initializing Coyote AJP/1.3 on ajp-8009 十月 16, 2015 12:41:40 上午 org.apache.coyote.ajp.AjpProtocol start 信息: Starting Coyote AJP/1.3 on ajp-8009 十月 16, 2015 12:41:40 上午 org.apache.catalina.startup.Catalina start 信息: Server startup in 77 ms 十月 16, 2015 12:41:50 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory docs 十月 16, 2015 12:41:51 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory examples 十月 16, 2015 12:41:51 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory host-manager 十月 16, 2015 12:41:51 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory manager 十月 16, 2015 12:41:51 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory ROOT
IDEA做SSM框架整合时,出现无法加载mapper,导致无法注入。
今日学习SSM框架整合,整合以后,单独用测试类可以连接成功连接数据库,可是一加入MVC用TOMCAT启动,项目就会报错,错误内容为:Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 以下为项目各部分截图,有没有大佬帮我分析下,问题到底出在哪? ========================================================================================================================================== ![项目报错详细情况](https://img-ask.csdn.net/upload/201908/15/1565880941_652575.png) ## 项目报错详细情况 ![spring配置文件已经配置了mapper.xml路径和齐对应的接口扫描包](https://img-ask.csdn.net/upload/201908/15/1565880955_958792.png) ## spring配置文件已经配置了mapper.xml路径和齐对应的接口扫描包 ![编译文件夹target里已经编译出了mapper相关配置文件及接口类](https://img-ask.csdn.net/upload/201908/15/1565881099_526884.png) ## 编译文件夹target里已经编译出了mapper相关配置文件及接口类 ![mapper.xml里的namespace已经指明了接口路径](https://img-ask.csdn.net/upload/201908/15/1565881139_161198.png) ## mapper.xml里的namespace已经指明了接口路径 ![pom文件里也配置了resource源](https://img-ask.csdn.net/upload/201908/15/1565881159_416309.png) ## pom文件里也配置了resource源 ========================================================================================================================================== # 详细代码已经贴在下方,只选了几个配置文件及mapper接口类,service及controller应该没关系就没传! ============================================= # mybatis-config.xml ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <!--添加缓存 引入第三方二级缓存 --> <settings> <setting name="mapUnderscoreToCamelCase" value="true"/> <setting name="cacheEnabled" value="false"/> </settings> <!-- 配置数据源 default默认使用的数据源 --> <environments default="mysql"> <environment id="mysql"> <transactionManager type="JDBC" /> <dataSource type="POOLED"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql:///orderuser"/> <property name="username" value="zhijia3278"/> <property name="password" value="0528"/> </dataSource> </environment> </environments> <!-- 映射文件 --> <mappers> <mapper resource="OrderUserMapper.xml"/> </mappers> </configuration> ``` # OrderUserMapper.java ``` package cn.tedu.mapper; import cn.tedu.domain.Order; import cn.tedu.domain.User; public interface OrderUserMapper { public User queryUser(String userId); public Order queryOrder(String orderId); public void updateUserPoints(User user); } ``` # OrderUserMapper.xml ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="cn.tedu.mapper.OrderUserMapper"> <select id="queryUser" parameterType="String" resultType="User"> select * from t_user where user_id=#{userId} </select> <select id="queryOrder" parameterType="String" resultType="Order"> select * from t_order where order_id=#{orderId} </select> <update id="updateUserPoints" parameterType="User"> update t_user set points=#{points} where user_id=#{userId} </update> </mapper> ``` # spring.xml ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!-- 配置内容 --> <context:component-scan base-package="cn.tedu"> </context:component-scan> <context:annotation-config></context:annotation-config> <!-- 持久层数据源 --> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"> <!-- 4个属性 --> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql:///orderuser"/> <property name="username" value="zhijia3278"/> <property name="password" value="0528"/> </bean> <!-- sqlSession --> <bean id="sqlSession" class="org.mybatis.spring.SqlSessionFactoryBean"> <!-- 数据源注入 --> <property name="dataSource" ref="dataSource"/> <!-- 扫描mybatis的独立配置文件 关闭二级缓存,驼峰命名 --> <property name="configLocation" value="classpath:mybatis/mybatis-config.xml"/> <!-- 映射文件扫描 --> <property name="mapperLocations" value="classpath:mapper/OrderUserMapper.xml" /> <!-- 别名包 --> <property name="typeAliasesPackage" value="cn.tedu.domain"></property> </bean> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!-- 扫描的接口包 cn.tedu.mapper --> <property name="basePackage" value="cn.tedu.mapper"/> </bean> <!-- 注解驱动开启,@RequestMapping @RequestParam等 --> <mvc:annotation-driven/> <!-- 防止静态文件js css html访问被dispacherServlet拦截 --> <!-- localhost静态文件根目录 /static /js /css --> <!-- mapping 满足什么样子的访问地址 http://localhost:8080/js//1.js --> <mvc:resources location="/" mapping="/**"></mvc:resources> </beans> ``` # springmvc-servlet ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!-- 配置内容 --> <context:component-scan base-package="cn.tedu"/> <!-- 注解驱动开启,@RequestMapping @RequestParam等 --> <mvc:annotation-driven/> <!-- 防止静态文件js css html访问被dispacherServlet拦截 --> <!-- localhost静态文件根目录 /static /js /css --> <!-- mapping 满足什么样子的访问地址 http://localhost:8080/js//1.js --> <mvc:resources location="/" mapping="/**"></mvc:resources> </beans> ``` # 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>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <!-- tomcat启动加载spring.xml --> <!-- <init-param>--> <!-- <param-name>contextConfigLocation</param-name>--> <!-- <param-value>classpath:springmvc/springmvc-servlet.xml</param-value>--> <!-- </init-param>--> </servlet> <servlet-mapping> <servlet-name>springmvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app> ``` # pom.xml ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>cn.tedu</groupId> <artifactId>SSMDemo</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <name>SSM-DEMO01 Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <!-- <dependency>--> <!-- <groupId>junit</groupId>--> <!-- <artifactId>junit</artifactId>--> <!-- <version>4.12</version>--> <!-- <scope>compile</scope>--> <!-- </dependency>--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.3.13.RELEASE</version> </dependency> <!-- datasource --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.14</version> </dependency> <!-- spring mysql --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.3.13.RELEASE</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.0.8</version> </dependency> <!-- mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.5</version> </dependency> <!-- spring mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.1</version> </dependency> <!-- springmvc --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.3.13.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.3.13.RELEASE</version> </dependency> <!-- jackson --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.8</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.8</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.8.8</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> </dependencies> <build> <finalName>SSM-DEMO01</finalName> <plugins> <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> <useBodyEncodingForURI>true</useBodyEncodingForURI> </configuration> </plugin> </plugins> <resources> <resource> <directory>resource</directory> <includes> <include>**/*.xml</include> <include>mapper/*.xml</include> <include>mybatis/*.xml</include> <include>spring/*.xml</include> </includes> <!-- <filtering>true</filtering>--> </resource> </resources> </build> </project> ```
公司做数据治理的项目,求解Springboot或者Springmvc环境中怎么集成Pentaho?
公司要做一个数据治理的项目,把各地的数据源通过pentaho这个工具集中到数据仓库,翻了一天资料还是没有找到在Springmvc或Springboot环境中怎么搭建pentaho这个环境!
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
python自动下载图片
近日闲来无事,总有一种无形的力量萦绕在朕身边,让朕精神涣散,昏昏欲睡。 可是,像朕这么有职业操守的社畜怎么能在上班期间睡瞌睡呢,我不禁陷入了沉思。。。。 突然旁边的IOS同事问:‘嘿,兄弟,我发现一个网站的图片很有意思啊,能不能帮我保存下来提升我的开发灵感?’ 作为一个坚强的社畜怎么能说自己不行呢,当时朕就不假思索的答应:‘oh, It’s simple. Wait for me for a ...
一名大专同学的四个问题
【前言】   收到一封来信,赶上各种事情拖了几日,利用今天要放下工作的时机,做个回复。   2020年到了,就以这一封信,作为开年标志吧。 【正文】   您好,我是一名现在有很多困惑的大二学生。有一些问题想要向您请教。   先说一下我的基本情况,高考失利,不想复读,来到广州一所大专读计算机应用技术专业。学校是偏艺术类的,计算机专业没有实验室更不用说工作室了。而且学校的学风也不好。但我很想在计算机领...
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
C++(数据结构与算法):62---搜索树(二叉搜索树、索引二叉搜索树)
一、搜索树的复杂度分析 本文考察二叉搜索树和索引二叉搜索树 二叉搜索树的渐进性能可以和跳表媲美: 查找、插入、删除操作所需的平均时间为Θ(logn) 查找、插入、删除操作的最坏情况的时间为Θ(n) 元素按升序输出时所需时间为Θ(n) 虽然在最坏情况下的查找、插入、删除操作,散列表和二叉搜索树的时间性能相同,但是散列表在最好的情况下具有超级性能Θ(1) 不过,对于一个指定的关键...
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
最全最强!世界大学计算机专业排名总结!
我正在参与CSDN200进20,希望得到您的支持,扫码续投票5次。感谢您! (为表示感谢,您投票后私信我,我把我总结的人工智能手推笔记和思维导图发送给您,感谢!) 目录 泰晤士高等教育世界大学排名 QS 世界大学排名 US News 世界大学排名 世界大学学术排名(Academic Ranking of World Universities) 泰晤士高等教育世界大学排名 中国共...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
立即提问