idea+maven项目添加test包

用idea创建maven项目时没有生成test包,现在想添加test包,但是添加到src目录下
没发创建java文件,请问这个问题该怎么解决;
图片说明

2个回答

图片说明
如图右键

qq_30244387
Dafeng ~ 万分感谢感谢。。。
大约 3 年之前 回复

图片说明
你也可以在这个设置里面管理你的项目

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
idea创建maven项目提示添加依赖
pom.xml中添加了运行servlet所需的依赖 ``` <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> </dependencies> ``` 但是具体的servlet无法自动导包,仍然提示添加依赖 ![图片说明](https://img-ask.csdn.net/upload/201907/12/1562925352_504506.png) ``` package cn.itheima.setvlet; import java.io.IOException; public class MyServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } } ``` 找不到解决方法,搞得我怀疑人生,跪求大哥指点
Maven中的test测试类ClassNotFoundException
在IDEA上使用quickstart新建一个maven工程,在test中的AppTest中写测试代码执行正常,但是自己新建的test测试类提示”找不到或无法加载主类“。 在不使用quickstart新建一个空白maven工程的时候,出现如上同样的报错。搜索了很久,没找到解决办法, 求指点![图片说明](https://img-ask.csdn.net/upload/201912/17/1576573034_506536.png) ![图片说明](https://img-ask.csdn.net/upload/201912/17/1576573045_752218.png) 执行main方法报错如下 ![图片说明](https://img-ask.csdn.net/upload/201912/18/1576632511_606706.jpg) 感谢@毕小宝 提供的解决思路 另外附上解决方案:[https://blog.csdn.net/Dawn510/article/details/103598714](https://blog.csdn.net/Dawn510/article/details/103598714 "")
idea的maven项目的jsp页面导入jstl标签
一直报错The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application。 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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.cc</groupId> <artifactId>chat</artifactId> <version>1.0-SNAPSHOT</version> <!-- 配置固定信息--> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> <org.springframework.version>4.0.0.RELEASE</org.springframework.version> <org.mybatis.version>3.4.1</org.mybatis.version> <org.mybatis.spring.version>1.3.0</org.mybatis.spring.version> </properties> <!--依赖导入--> <dependencies> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-servlet-api</artifactId> <version>7.0.64</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.7.3</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${org.mybatis.spring.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${org.mybatis.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.11</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> <!--<scope>runtime</scope>--> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>20.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <!--<scope>test</scope>--> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.3</version> </dependency> <!-- id加密解密 --> <dependency> <groupId>org.hashids</groupId> <artifactId>hashids</artifactId> <version>1.0.1</version> </dependency> <!-- ftpclient --> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.1</version> </dependency> <!-- file upload --> <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.0.1</version> </dependency> <!-- mybatis pager --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>4.1.0</version> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>com.github.jsqlparser</groupId> <artifactId>jsqlparser</artifactId> <version>0.9.4</version> </dependency> <!-- alipay --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> <!--jstl--> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> </dependency> </dependencies> <build> <finalName>chat</finalName> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> </plugin> <!-- geelynote maven的核心插件之-complier插件默认只支持编译Java 1.4,因此需要加上支持高版本jre的配置,在pom.xml里面加上 增加编译插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs> </compilerArguments> </configuration> </plugin> </plugins> </build> </project> jsp页面taglib: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page isELIgnored="false" %> 求助:怎么才会不报错啊,网上好多方法都尝试了,
intellij idea下运行正常,用maven->package打包时失败,搞了半天没解决,求问
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/transaction/SystemException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1710) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]//字数限制,贴不完 还有一个: java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125) ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE] at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:107) ~[spring-test-5.0.4.RELEASE.jar:5.0.4.RELEASE] 结果: [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.203 s <<< FAILURE! - in com.gdufs.mango.MangoApplicationTests [ERROR] contextLoads(com.gdufs.mango.MangoApplicationTests) Time elapsed: 0.004 s <<< ERROR! java.lang.IllegalStateException: Failed to load ApplicationContext Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/transaction/SystemException Caused by: java.lang.NoClassDefFoundError: javax/transaction/SystemException Caused by: java.lang.ClassNotFoundException: javax.transaction.SystemException
请问idea如何方便的进行多分支开发
请不要答非所问! 请不要答非所问! 请不要答非所问! 我知道如何拉出新分支,我也知道如何合并分支到主线。 我的问题是:《出于工作需要,分别对主线和分支进行开发的时候,如何快速的从主线工作中切换到分支工作中》 你问我为什么会有这么个问题? 好的,以下就是我的困境: 项目是maven管理的web项目,需要使用maven命令进行compile、package等工作。(什么?右方侧边栏就有?抱歉,那玩意用不了,因为没法配置参数)所以我们必须定义一套Debug Configurations。当然,定义好了之后,用起来是很方便的。 然而痛苦的事情发生了,使用idea检出项目到文件夹下之后,它是一个全新的工作空间,所有配置都是空的!也就是说,当从主线切换到分支进行工作的时候,必须首先down下分支,然后把那一大套Debug Configurations重新设置一遍,然后再进行开发。(什么?直接把主线切过去不就行了?开什么玩笑,只有我和鬼才知道主线上有什么未提交的魔法代码,现在只有鬼知道) 诚然我看到了太多idea比Eclipse优越的原因,但我不想听那些,我只想得到该有的解决方案。不得不说,Eclipse成熟的应用环境,使得对Eclipse的任何操作问题都可以很方便的得到答案,而idea么……现在的网上,大量的复制粘贴,大量的枪手宣传文,却没有找到有价值的指南…… =_=就好像我迄今都没能完美解决skip test的问题。我们都知道,在eclipse下,应用maven跳过test的情况下,完全不必在乎它。但在idea下,如果test包中有error,我们就不能编译它。(你问我为什么不把error干掉?因为那里有魔法) 我当然知道右面的侧边栏中有一个小按钮,按一下就可以跳过test了,我当然也知道maven命令Dmaven.test.skip=true。但那些都没有用,maven管理的多项目依赖,test包下的文件是要依赖于其它项目下的test包的。如果被依赖的项目,其test包被skip掉而不再编译的话,那么当前项目下对应的test包下文件就会因为无法导入正确的包从而出现error。有error,那么编译就无法正常执行。这就是为什么即使跳过了test包也无法正常编译的原因! 你知道我现在是怎么解决问题的吗? 没错,我把test包下的一切都删掉了=_= 除非真的有办法解决我的问题,否则我不打算把悬赏丢给任何一个草率的回应者。
idea配置mybits generate时报错,请问是哪配错了吗?
报错说找不到driver-class-name核对了很多次都没问题啊 报错: ``` D:\jdk1.8.0_121\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\mycode\demo_mybits\demo "-Dmaven.home=D:\software\idea\IntelliJ IDEA 2018.2.6\plugins\maven\lib\maven3" "-Dclassworlds.conf=D:\software\idea\IntelliJ IDEA 2018.2.6\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:D:\software\idea\IntelliJ IDEA 2018.2.6\lib\idea_rt.jar=7115:D:\software\idea\IntelliJ IDEA 2018.2.6\bin" -Dfile.encoding=UTF-8 -classpath "D:\software\idea\IntelliJ IDEA 2018.2.6\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.2.6 mybatis-generator:generate -e [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building demo 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ demo --- [INFO] Connecting to the Database [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.637 s [INFO] Finished at: 2019-11-11T09:52:35+08:00 [INFO] Final Memory: 14M/245M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project demo: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Exception getting JDBC Driver: {spring.datasource.driver-class-name} -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project demo: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Exception getting JDBC Driver at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Exception getting JDBC Driver at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 21 more Caused by: java.lang.RuntimeException: Exception getting JDBC Driver at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(ConnectionFactory.java:85) at org.mybatis.generator.internal.db.ConnectionFactory.getConnection(ConnectionFactory.java:54) at org.mybatis.generator.config.Context.getConnection(Context.java:526) at org.mybatis.generator.config.Context.introspectTables(Context.java:436) at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:222) at org.mybatis.generator.maven.MyBatisGeneratorMojo.execute(MyBatisGeneratorMojo.java:203) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 22 more Caused by: java.lang.ClassNotFoundException: {spring.datasource.driver-class-name} at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.mybatis.generator.internal.ObjectFactory.internalClassForName(ObjectFactory.java:150) at org.mybatis.generator.internal.ObjectFactory.externalClassForName(ObjectFactory.java:121) at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(ConnectionFactory.java:82) ... 28 more [ERROR] [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/PluginExecutionException Process finished with exit code 1 ``` application.properties ``` ## 服务器端口,如果不配置默认是8080端口 server.port=9090 ## 数据库设置 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/boot_demo?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8 spring.datasource.username=root spring.datasource.password=x5 ## mybatis配置 # 参数类型的包别名设置 mybatis.typeAliasesPackage=com.example.demo.model # 指向映射xml文件目录 mybatis.mapperLocations=classpath:mapper/*.xml pagehelper.helperDialect=mysql pagehelper.reasonable=true pagehelper.supportMethodsArguments=true pagehelper.params=count=countSql ``` 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <name>demo</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.10</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.7</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.18</version> <scope>runtime</scope> </dependency> </dependencies> </plugin> </plugins> </build> </project> ``` generatorConfig.xml ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> <generatorConfiguration> <!--导入配置文件--> <properties resource="application.properties"></properties> <!-- 一个数据库一个context --> <context id="default"> <!-- 注释生成设置 --> <commentGenerator> <!-- 是否生成注释代时间戳--> <property name="suppressDate" value="true" /> <!-- 是否取消注释 --> <property name="suppressAllComments" value="true" /> </commentGenerator> <!--jdbc的数据库连接--> <jdbcConnection driverClass="{spring.datasource.driver-class-name}" connectionURL="{spring.datasource.url}" userId="{spring.datasource.username}" password="{spring.datasource.password}"> <property name="nullCatalogMeansCurrent" value="true" /> </jdbcConnection> <!-- 类型转换 --> <javaTypeResolver> <!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) --> <property name="forceBigDecimals" value="false" /> </javaTypeResolver> <!-- targetPackage:生成的实体类所在的包 --> <!-- targetProject:生成的实体类所在的硬盘位置 --> <javaModelGenerator targetPackage="com.example.demo.model" targetProject="src/main/java"> <!-- 是否允许子包 --> <property name="enableSubPackages" value="false" /> <!-- 是否对modal添加构造函数 --> <property name="constructorBased" value="true" /> <!-- 是否清理从数据库中查询出的字符串左右两边的空白字符 --> <property name="trimStrings" value="true" /> <!-- 建立modal对象是否不可改变 即生成的modal对象不会有setter方法,只有构造方法 --> <property name="immutable" value="false" /> </javaModelGenerator> <!-- targetPackage 和 targetProject:生成的 mapper xml 文件的包和位置 --> <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"> <!-- 是否在当前路径下新加一层schema,ex:false路径com.qikegu.demo.model, com.qikegu.demo.model.[schemaName] --> <property name="enableSubPackages" value="false" /> <!-- 是否针对string类型的字段在set的时候进行trim调用 --> <property name="trimStrings" value="true"/> </sqlMapGenerator> <!-- targetPackage 和 targetProject:生成的 java interface 文件的包和位置 --> <javaClientGenerator type="XMLMAPPER" targetPackage="com.example.demo.repository" targetProject="src/main/java"> <!-- 是否在当前路径下新加一层schema,ex:false路径com.qikegu.demo.model, com.qikegu.demo.model.[schemaName] --> <property name="enableSubPackages" value="false" /> </javaClientGenerator> <!-- 配置表信息 --> <!-- schema即为数据库名 tableName为对应的数据库表 domainObjectName是要生成的实体类 enable*ByExample, 是否生成 example类 --> <!-- 不同的表,修改tableName和domainObjectName就可以 --> <table tableName="user" domainObjectName="User" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"> </table> </context> </generatorConfiguration> ```
IntelliJ IDEA中 子项目文件路径问题,求解决
先看图,然后我仔细解释 最近发现找不到文件,同样的代码在eclipse中可以正常找到,对于idea不熟悉,所以来此请教,我是把一些文件拷resources目录下,发现找不到了,使用相对路径,我看到target/classes中是编译过去了的啊,这个路径该怎么写? 在eclipse中 (1) 主项目包含的两个模块 topsoft-test(web项目) topsoft-utils(java maven项目) (2)(3)(4) 根据new File("log4j.xml);以及创建文件可以发现路径是相对于子项目topsoft-utils 的跟路径,(4)标注了这个测试类是在topsoft-utils中运行的 (5) 假如说我想访问(5)标注处的这个文件,相对路径该怎么写? 转到IntelliJ IDEA中,目录结构一样,运行的测试也是一样,打印出来的目录不同,我想这是IDE的区别,或者说是在IDEA的配置当中哪里出了问题,导入maven项目我就默认的 Project Structure 我看到里面有三个模块。 路径中只写文件名不是相对于classpath路径么,为什么相对于项目的跟路径了,eclipse中这样可以接受,至少还能加上src/main/....访问到,而在IntelliJ中就完全不对了,主项目打包会产生子项目的jar包,而我访问的文件应该是相对于子项目的classpath路径,在IntelliJ中,resources是在classpath中的,如果只写名字应该是相对于子项目的resources目录才对啊,理论上。 请赐教 我查看了打包编译后的目录,确实是打进去了的,为什么通过只写文件名这种方式就访问不到呢? ![图片说明](https://img-ask.csdn.net/upload/201505/09/1431177338_85711.png) ![图片说明](https://img-ask.csdn.net/upload/201505/09/1431177353_676840.png) ![图片说明](https://img-ask.csdn.net/upload/201505/09/1431177361_924830.png) ![图片说明](https://img-ask.csdn.net/upload/201505/09/1431177369_671312.png) ![图片说明](https://img-ask.csdn.net/upload/201505/09/1431177379_723727.png)
Springboot2.2.2不能连接数据库
1.写一个体验redis缓存的demo,不能连接数据库。 导入其他人的项目可以,连接自己的数据库,可以连接成功。确定数据库连接信息没有写错。参考网上,修改mysql-connector-java的版本也没有用。 系统环境:java-1.8; mysql-5.1.62; IDEA 2019-1.4;SpringBoot 2.2.2; 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.2.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>cache</artifactId> <version>0.0.1-SNAPSHOT</version> <name>cache</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.34</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> 3.配置文件 ![图片说明](https://img-ask.csdn.net/upload/202001/06/1578275877_830078.png) 4.报错信息 ![图片说明](https://img-ask.csdn.net/upload/202001/06/1578276565_257380.png) ![图片说明](https://img-ask.csdn.net/upload/202001/06/1578275918_258494.png) ![图片说明](https://img-ask.csdn.net/upload/202001/06/1578275931_720085.png) ![图片说明](https://img-ask.csdn.net/upload/202001/06/1578275953_50439.png) ![图片说明](https://img-ask.csdn.net/upload/202001/06/1578275966_288013.png)
idea配置spring-boot,引入的test路径找不到
idea配置spring-boot,引入的test路径找不到 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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.3.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>spring-boot</artifactId> <version>0.0.1-SNAPSHOT</version> <name>spring-boot</name> <description>Demo project for Spring Boot</description> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> </properties> <dependencies> <!-- 启动web支持 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- 添加单元测试 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!-- 添加处理器,spring-boot默认加载的是yml文件,这个配置就是用于引入传统的xml或properties配置 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ``` 报错截图: ![图片说明](https://img-ask.csdn.net/upload/201903/12/1552370851_670003.png) 依赖包: ![图片说明](https://img-ask.csdn.net/upload/201903/12/1552370943_799650.png) ![图片说明](https://img-ask.csdn.net/upload/201903/12/1552370954_624153.png)
springboot2.2.0项目无法使用@EnableFeignClients已添加starter-openfeign和openfeign-core
环境: maven3.0+springboot2.2.0 想做微服务调用使用feign,启动类添加@EnableDiscoveryClient和@EnableDiscoveryClient 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>consumer</artifactId> <version>0.0.1-SNAPSHOT</version> <name>consumer</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> <version>2.1.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-feign</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-openfeign-core</artifactId> <version>2.0.0.RC1</version> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> <version>2.0.0.RC1</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ``` 如果不添加spring-cloud-openfeign-core,注解无法使用。 如果添加了他,启动项目时报错context找不到。 真心是无解了。。。。这springboot2.2.0怎么这么多坑
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> ```
IDEA重复操作数据库的
在idea中进行mybaits插入操作时自己会重复的再做一次操作,以前用spring的时候也是,只要在测试类中进行测试就会重复操作数据库, maven工程下test,如何解决
maven插件jetty:run运行项目一直失败显示
在idea中maven依赖jetty:run运行一个项目一直报这个错误 ``` [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Xiaomi Finance LC OSS Web Project 1.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> jetty-maven-plugin:8.1.3.v20120416:run (default-cli) > test-compile @ lc-oss-web >>> [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lc-oss-web --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 14 resources [INFO] Copying 3 resources to /Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/target/classes/config [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ lc-oss-web --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lc-oss-web --- [INFO] Not copying test resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ lc-oss-web --- [INFO] Not compiling test sources [INFO] [INFO] <<< jetty-maven-plugin:8.1.3.v20120416:run (default-cli) < test-compile @ lc-oss-web <<< [INFO] [INFO] --- jetty-maven-plugin:8.1.3.v20120416:run (default-cli) @ lc-oss-web --- [INFO] Configuring Jetty for project: Xiaomi Finance LC OSS Web Project [INFO] webAppSourceDirectory /Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp does not exist. Defaulting to /Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp [INFO] Reload Mechanic: manual [INFO] Classes = /Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/target/classes [INFO] Applying context xml file src/main/resources/jetty-context.xml [INFO] Context path = / [INFO] Tmp directory = /Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/target/tmp [INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml [INFO] Web overrides = none [INFO] web.xml file = file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/WEB-INF/web.xml [INFO] Webapp directory = /Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp [INFO] jetty-8.1.3.v20120416 [INFO] No Transaction manager found - if your webapp requires one, please configure one. [INFO] No Spring WebApplicationInitializer types detected on classpath [INFO] started o.m.j.p.JettyWebAppContext{/,file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/},file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/ [INFO] started o.m.j.p.JettyWebAppContext{/,file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/},file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/ [INFO] started o.m.j.p.JettyWebAppContext{/,file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/},file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/ [INFO] Set web app root system property: 'webapp.root' = [/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp] [INFO] Initializing log4j from [classpath:/config/log4j.xml] [WARNING] FAILED o.m.j.p.JettyWebAppContext{/,file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/},file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/: java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:901) at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:72) at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:152) at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) at org.eclipse.jetty.server.Server.doStart(Server.java:262) at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364) at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) [WARNING] FAILED org.eclipse.jetty.server.handler.ContextHandlerCollection@4a2047ce: java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:901) at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:72) at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:152) at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) at org.eclipse.jetty.server.Server.doStart(Server.java:262) at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364) at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) [WARNING] FAILED org.eclipse.jetty.server.handler.HandlerCollection@d4a4b67: java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:901) at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:72) at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:152) at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) at org.eclipse.jetty.server.Server.doStart(Server.java:262) at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364) at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) [WARNING] FAILED org.mortbay.jetty.plugin.JettyServer@36214bbd: java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:901) at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:72) at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:152) at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:764) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:756) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) at org.eclipse.jetty.server.Server.doStart(Server.java:262) at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364) at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) [INFO] Jetty server exiting. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20.149 s [INFO] Finished at: 2019-04-09T17:06:45+08:00 [INFO] Final Memory: 53M/1963M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.mortbay.jetty:jetty-maven-plugin:8.1.3.v20120416:run (default-cli) on project lc-oss-web: Execution default-cli of goal org.mortbay.jetty:jetty-maven-plugin:8.1.3.v20120416:run failed: An API incompatibility was encountered while executing org.mortbay.jetty:jetty-maven-plugin:8.1.3.v20120416:run: java.lang.NoSuchMethodError: org.apache.log4j.LogManager.getLoggerRepository()Lorg/apache/log4j/spi/LoggerRepository; [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.mortbay.jetty:jetty-maven-plugin:8.1.3.v20120416 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/Users/Stefan/.m2/repository/org/mortbay/jetty/jetty-maven-plugin/8.1.3.v20120416/jetty-maven-plugin-8.1.3.v20120416.jar [ERROR] urls[1] = file:/Users/Stefan/.m2/repository/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar [ERROR] urls[2] = file:/Users/Stefan/.m2/repository/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar [ERROR] urls[3] = file:/Users/Stefan/.m2/repository/net/sf/log4jdbc/log4jdbc4/1.2/log4jdbc4-1.2.jar [ERROR] urls[4] = file:/Users/Stefan/.m2/repository/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30.jar [ERROR] urls[5] = file:/Users/Stefan/.m2/repository/ch/qos/logback/logback-core/1.0.7/logback-core-1.0.7.jar [ERROR] urls[6] = file:/Users/Stefan/.m2/repository/ch/qos/logback/logback-classic/1.0.7/logback-classic-1.0.7.jar [ERROR] urls[7] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-util/8.1.3.v20120416/jetty-util-8.1.3.v20120416.jar [ERROR] urls[8] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-webapp/8.1.3.v20120416/jetty-webapp-8.1.3.v20120416.jar [ERROR] urls[9] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-xml/8.1.3.v20120416/jetty-xml-8.1.3.v20120416.jar [ERROR] urls[10] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-servlet/8.1.3.v20120416/jetty-servlet-8.1.3.v20120416.jar [ERROR] urls[11] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-security/8.1.3.v20120416/jetty-security-8.1.3.v20120416.jar [ERROR] urls[12] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-server/8.1.3.v20120416/jetty-server-8.1.3.v20120416.jar [ERROR] urls[13] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-continuation/8.1.3.v20120416/jetty-continuation-8.1.3.v20120416.jar [ERROR] urls[14] = file:/Users/Stefan/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar [ERROR] urls[15] = file:/Users/Stefan/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar [ERROR] urls[16] = file:/Users/Stefan/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar [ERROR] urls[17] = file:/Users/Stefan/.m2/repository/org/sonatype/aether/aether-util/1.11/aether-util-1.11.jar [ERROR] urls[18] = file:/Users/Stefan/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar [ERROR] urls[19] = file:/Users/Stefan/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar [ERROR] urls[20] = file:/Users/Stefan/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar [ERROR] urls[21] = file:/Users/Stefan/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [ERROR] urls[22] = file:/Users/Stefan/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/2.9/maven-plugin-tools-api-2.9.jar [ERROR] urls[23] = file:/Users/Stefan/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar [ERROR] urls[24] = file:/Users/Stefan/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar [ERROR] urls[25] = file:/Users/Stefan/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar [ERROR] urls[26] = file:/Users/Stefan/.m2/repository/net/sf/jtidy/jtidy/r938/jtidy-r938.jar [ERROR] urls[27] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-plus/8.1.3.v20120416/jetty-plus-8.1.3.v20120416.jar [ERROR] urls[28] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.transaction/1.1.1.v201105210645/javax.transaction-1.1.1.v201105210645.jar [ERROR] urls[29] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-jndi/8.1.3.v20120416/jetty-jndi-8.1.3.v20120416.jar [ERROR] urls[30] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.mail.glassfish/1.4.1.v201005082020/javax.mail.glassfish-1.4.1.v201005082020.jar [ERROR] urls[31] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.activation/1.1.0.v201105071233/javax.activation-1.1.0.v201105071233.jar [ERROR] urls[32] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-jmx/8.1.3.v20120416/jetty-jmx-8.1.3.v20120416.jar [ERROR] urls[33] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-annotations/8.1.3.v20120416/jetty-annotations-8.1.3.v20120416.jar [ERROR] urls[34] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.annotation/1.1.0.v201108011116/javax.annotation-1.1.0.v201108011116.jar [ERROR] urls[35] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/org.objectweb.asm/3.1.0.v200803061910/org.objectweb.asm-3.1.0.v200803061910.jar [ERROR] urls[36] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-websocket/8.1.3.v20120416/jetty-websocket-8.1.3.v20120416.jar [ERROR] urls[37] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-io/8.1.3.v20120416/jetty-io-8.1.3.v20120416.jar [ERROR] urls[38] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-http/8.1.3.v20120416/jetty-http-8.1.3.v20120416.jar [ERROR] urls[39] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/jetty-jsp/8.1.3.v20120416/jetty-jsp-8.1.3.v20120416.jar [ERROR] urls[40] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.servlet.jsp/2.2.0.v201112011158/javax.servlet.jsp-2.2.0.v201112011158.jar [ERROR] urls[41] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar [ERROR] urls[42] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/org.apache.jasper.glassfish/2.2.2.v201112011158/org.apache.jasper.glassfish-2.2.2.v201112011158.jar [ERROR] urls[43] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.servlet.jsp.jstl/1.2.0.v201105211821/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar [ERROR] urls[44] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/org.apache.taglibs.standard.glassfish/1.2.0.v201112081803/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar [ERROR] urls[45] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/javax.el/2.2.0.v201108011116/javax.el-2.2.0.v201108011116.jar [ERROR] urls[46] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/com.sun.el/2.2.0.v201108011116/com.sun.el-2.2.0.v201108011116.jar [ERROR] urls[47] = file:/Users/Stefan/.m2/repository/org/eclipse/jetty/orbit/org.eclipse.jdt.core/3.7.1/org.eclipse.jdt.core-3.7.1.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [ERROR] -> [Help 1] [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/PluginContainerException [INFO] Closing Spring root WebApplicationContext [INFO] Shutting down log4j [INFO] stopped o.m.j.p.JettyWebAppContext{/,file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/},file:/Users/Stefan/xiaomi/cashpay-lc-oss/lc-oss/lc-oss-web/src/main/webapp/ Disconnected from the target VM, address: '127.0.0.1:51838', transport: 'socket' Process finished with exit code 1 log4j的版本是1.2.16应该不是版本的问题 求好心人帮助帮我看看是什么问题
IDEA创建的SpringBoot项目,pom.xml在Eclipse上报错
总监非要我把IDEA换成SpringBoot的开发工具 sts(eclipse), 现在将我idea上的项目导入eclipse后,pom.xml报错: ![图片说明](https://img-ask.csdn.net/upload/201707/27/1501124939_360289.png) ![图片说明](https://img-ask.csdn.net/upload/201707/27/1501124968_8922.png) **完整信息如下:** For artifact {org.springframework.boot:spring-boot-starter-data-api:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-resources-plugin:2.6:testResources:default-testResources:process-test-resources) org.apache.maven.artifact.InvalidArtifactRTException: For artifact {org.springframework.boot:spring-boot-starter-data-api:null:jar}: The version cannot be empty. at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148) at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123) at org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:157) at org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:57) at org.apache.maven.project.artifact.MavenMetadataSource.createDependencyArtifact(MavenMetadataSource.java:328) at org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:503) at org.apache.maven.lifecycle.internal.DefaultProjectArtifactFactory.createArtifacts(DefaultProjectArtifactFactory.java:50) at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:119) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:330) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) pom.xml中还有这个也报错: ![图片说明](https://img-ask.csdn.net/upload/201707/27/1501125074_482352.png) ![图片说明](https://img-ask.csdn.net/upload/201707/27/1501125081_51583.png) 求教是什么原因,如何解决?
git add的时候出错,是什么原因?改怎样解决?
The following problems have occurred when adding the files: The following paths are ignored by one of your .gitignore files: .idea Use -f if you really want to add them. during executing git "C:\Program Files\Git\cmd\git.exe" -c core.quotepath=false add --ignore-errors -- profiles/profile-prd.properties .idea/libraries/Maven__org_mybatis_mybatis_spring_1_2_4.xml .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_5_1.xml .idea/libraries/Maven__com_google_guava_guava_18_0.xml rest-client/src/main/java/com/core/ws/client/domain/Item.java .idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_9.xml .idea/libraries/Maven__com_mchange_c3p0_0_9_5.xml .idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml .idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml .idea/libraries/Maven__commons_codec_commons_codec_1_10.xml .idea/vcs.xml .idea/encodings.xml .idea/compiler.xml rest-client/src/test/Java/com/core/ws/lient/ItemApiTest.java .idea/libraries/Maven__postgresql_postgresql_9_1_901_jdbc4.xml .idea/libraries/Maven__org_testng_testng_6_9_10.xml .idea/libraries/Maven__org_mybatis_mybatis_3_3_1.xml .idea/libraries/Maven__junit_junit_4_12.xml .idea/libraries/Maven__com_beust_jcommander_1_48.xml .idea/modules.xml .idea/misc.xml data-storage/src/main/resources/application.properties ![图片说明](https://img-ask.csdn.net/upload/201703/03/1488532208_254495.jpg)
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启动报错 一个是找不到url 一个是找不到dao
## 之前一直启动都没有问题,今天突然发现启动不了 ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570671612_490949.jpg) ## 然后我把启动的位置改成@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) ``` package com.mall.shopping.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; /*@SpringBootApplication*/ @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } } ``` ## 然后会报新的错: ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570671806_766601.jpg) # 到现在没找到新错误的原因 还是在报找不到dao的错误。 ## 实体类代码: ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570672651_585106.jpg) ## controller代码: ``` package com.mall.shopping.demo.controller; import com.mall.shopping.demo.services.UserService; import com.mall.shopping.demo.vo.Huser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Iterator; import java.util.List; @Controller public class UserController { @Autowired private UserService userService; @RequestMapping("/tiao") public ModelAndView zhuan() { ModelAndView modelAndView = new ModelAndView("loginindex"); return modelAndView; } @RequestMapping("/tiao1") public ModelAndView zhuan1() { ModelAndView modelAndView = new ModelAndView("adminindex"); return modelAndView; } @RequestMapping("/Userlogin") public String userlogin(HttpServletRequest request, HttpServletResponse response) { String username = (String) request.getParameter("username"); String userpwd = (String)request.getParameter("userpwd"); List<Huser> huser = userService.userlogin(); Iterator iter = huser.iterator(); while(iter.hasNext()){ Huser ha = (Huser) iter.next(); if(username.equals(ha.getHuser())) { if(userpwd.equals(ha.getHpwd())) { return "redirect:/tiao1"; } else { return "redirect:/tiao"; } } } return "redirect:/tiao"; } } ``` ## services代码: ``` package com.mall.shopping.demo.services; import com.mall.shopping.demo.dao.UserDao; import com.mall.shopping.demo.vo.Huser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class UserService { @Autowired private UserDao userDao; public List<Huser> userlogin(){ return userDao.userlogin();} } ``` ## daoceng代码: ``` package com.mall.shopping.demo.dao; import com.mall.shopping.demo.vo.Huser; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; import java.util.List; @Repository @Mapper public interface UserDao { List<Huser>userlogin(); } ``` ## mybatitsconfig: ``` <?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> <!-- 开启驼蜂标识:last_name lastName --> <settings> <setting name="mapUnderscoreToCamelCase" value="true"/> </settings> <!-- 实体Bean别名 --> <typeAliases> <package name="com.mall.shopping.demo.vo.Huser"/> <package name="com.mall.shopping.demo.vo.Hdaohang"/> </typeAliases> <mappers> <mapper resource="mapper/select-login.xml"/> <mapper resource="mapper/select-hdaohang.xml"/> </mappers> </configuration> ``` ## 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="com.mall.shopping.demo.dao.UserDao"> <resultMap id="SelectLogin" type="com.mall.shopping.demo.vo.Huser"> <id property="hid" column="HID"></id> <result property="huser" column="HUSER"></result> <result property="hpwd" column="HPWD"></result> </resultMap> <select id="userlogin" resultMap="SelectLogin"> select * from huser </select> </mapper> ``` ## application.properties ``` server.port=8083 server.address=127.0.0.1 #server.session-timeout=60 spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl spring.datasource.username=scott spring.datasource.password=tiger spring.datasource.driver-class-name=oracle.jdbc.OracleDriver mybatis.mapperLocations=classpath:mapper/*.xml mybatis.config-locations=classpath:mybatis/mybatis-config.xml spring.mvc.view.prefix=/WEB-INF/views/ spring.mvc.view.suffix=.jsp ``` ## 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.7.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.mall.shopping</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>demo</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <spring.version>5.1.5.RELEASE</spring.version> <!-- mybatis版本号 --> <mybatis.version>3.4.5</mybatis.version> <!-- oracle驱动版本号 --> <oracle-driver.version>11.2.0</oracle-driver.version> <!-- log4j日志包版本号 --> <slf4j.version>1.7.18</slf4j.version> <log4j.version>1.2.17</log4j.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <!-- 添加spring核心库 --> <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-oxm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</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-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-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <!-- 添加mybatis依赖 --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <!-- mybatis/spring包 --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.0</version> </dependency> <!-- oracle驱动依赖 --> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>${oracle-driver.version}</version> </dependency> <!-- dbcp,用来在spring-mybatis.xml中配置数据库 --> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j.version}</version> </dependency> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.5</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>org.xmlunit</groupId> <artifactId>xmlunit-core</artifactId> </dependency> <!-- <dependency> <groupId>com.mchange</groupId> <artifactId>c3p0</artifactId> <version>0.9.5.2</version> </dependency>--> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency> <!--用于编译jsp --> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <scope>provided</scope> </dependency> <!--添加热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <scope>true</scope> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>3.1.0</version> </plugin> <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging --> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>3.0.2</version> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>3.2.2</version> </plugin> <plugin> <artifactId>maven-install-plugin</artifactId> <version>2.5.2</version> </plugin> <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> <!--热部署配置--> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!--fork:如果没有该项配置,整个devtools不会起作用--> <fork>true</fork> </configuration> </plugin> <!-- <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <versionRange>[1.2,)</versionRange> <goals> <goal>enforce</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin>--> <!--mybatis 逆向工程插件--> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.5</version> <configuration> <configurationFile>src/main/resources/mybatis-generator/generatorConfig.xml</configurationFile> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <executions> <execution> <id>Generate MyBatis Artifacts</id> <goals> <goal>generate</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>${oracle-driver.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.5</version> </dependency> </dependencies> </plugin> </plugins> <!-- <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory>src/main/resources</directory> </resource> </resources>--> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build> </project> ``` ## 目录结构: ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570672730_102043.jpg)
在IDEA导入Gradle项目之后一直报错
代码用的Spring Boot+ MyBatis 导入后一直报如下错误 ``` Could not find org.springframework.boot:spring-boot-gradle-plugin:1.5.7.RELEASE. Searched in the following locations: http://maven.aliyun.com/nexus/content/groups/public/org/springframework/boot/spring-boot-gradle-plugin/1.5.7.RELEASE/spring-boot-gradle-plugin-1.5.7.RELEASE.pom http://maven.aliyun.com/nexus/content/groups/public/org/springframework/boot/spring-boot-gradle-plugin/1.5.7.RELEASE/spring-boot-gradle-plugin-1.5.7.RELEASE.jar Required by: project : ``` Gradle相关配置如下 ``` apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'org.springframework.boot' if (!DEVELOP_MODE.toBoolean()) { apply plugin: 'war' } group = 'com.server' version = '0.0.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } } configurations { providedRuntime } dependencies { compile('org.springframework.boot:spring-boot-starter-aop') compile('org.springframework.boot:spring-boot-starter-data-jpa') compile('org.springframework.boot:spring-boot-starter-jdbc') compile('org.springframework.boot:spring-boot-starter-web') compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1') compile "org.springframework.boot:spring-boot-starter-thymeleaf" runtime('mysql:mysql-connector-java') if (!DEVELOP_MODE.toBoolean()) { providedRuntime('org.springframework.boot:spring-boot-starter-tomcat') } testCompile('org.springframework.boot:spring-boot-starter-test') } ```
springboot集成apache.cxf实现wsdl webservice接口服务及客户端,使用maven打包是遇到乱码问题
springboot集成apache.cxf实现wsdl webservice接口服务及客户端,使用的工具是idea。在工具内直接启动时没有问题,但使用maven打包时报错 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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.4.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.hls</groupId> <artifactId>hisapi</artifactId> <version>0.0.1-SNAPSHOT</version> <name>hisapi</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> <projcet.build.sourceEncoding>UTF-8</projcet.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.0.1</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!-- http所需包 --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> </dependency> <!-- /http所需包 --> <!-- 数据解析所需包 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.4</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.4</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-spring-boot-starter-jaxws</artifactId> <version>3.2.6</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.16.20</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ``` 执行mav install提示错误信息如下 ``` C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:11: 错误: 编码GBK的不可映射字符 * <p>abstractJSON complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:11: 错误: 编码GBK的不可映射字符 * <p>abstractJSON complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:11: 错误: 编码GBK的不可映射字符 * <p>abstractJSON complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:13: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AbstractJSON.java:13: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:10: 错误: 编码GBK的不可映射字符 * <p>addAndUpdate complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:10: 错误: 编码GBK的不可映射字符 * <p>addAndUpdate complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:10: 错误: 编码GBK的不可映射字符 * <p>addAndUpdate complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:12: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:12: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:49: 错误: 编码GBK的不可映射字符 * 璁剧疆arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:49: 错误: 编码GBK的不可映射字符 * 璁剧疆arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdate.java:49: 错误: 编码GBK的不可映射字符 * 璁剧疆arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:13: 错误: 编码GBK的不可映射字符 * <p>addAndUpdateResponse complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:13: 错误: 编码GBK的不可映射字符 * <p>addAndUpdateResponse complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:13: 错误: 编码GBK的不可映射字符 * <p>addAndUpdateResponse complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:15: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:15: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:62: 错误: 编码GBK的不可映射字符 * 鑾峰彇return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:62: 错误: 编码GBK的不可映射字符 * 鑾峰彇return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:62: 错误: 编码GBK的不可映射字符 * 鑾峰彇return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:74: 错误: 编码GBK的不可映射字符 * 璁剧疆return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:74: 错误: 编码GBK的不可映射字符 * 璁剧疆return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:74: 错误: 编码GBK的不可映射字符 * 璁剧疆return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:87: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:87: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:87: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:89: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:89: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:155: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:155: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:155: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:157: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:157: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:185: 错误: 编码GBK的不可映射字符 * 鑾峰彇key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:185: 错误: 编码GBK的不可映射字符 * 鑾峰彇key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:185: 错误: 编码GBK的不可映射字符 * 鑾峰彇key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:197: 错误: 编码GBK的不可映射字符 * 璁剧疆key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:197: 错误: 编码GBK的不可映射字符 * 璁剧疆key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:197: 错误: 编码GBK的不可映射字符 * 璁剧疆key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:209: 错误: 编码GBK的不可映射字符 * 鑾峰彇value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:209: 错误: 编码GBK的不可映射字符 * 鑾峰彇value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:209: 错误: 编码GBK的不可映射字符 * 鑾峰彇value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:221: 错误: 编码GBK的不可映射字符 * 璁剧疆value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:221: 错误: 编码GBK的不可映射字符 * 璁剧疆value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\AddAndUpdateResponse.java:221: 错误: 编码GBK的不可映射字符 * 璁剧疆value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:10: 错误: 编码GBK的不可映射字符 * <p>delete complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:10: 错误: 编码GBK的不可映射字符 * <p>delete complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:10: 错误: 编码GBK的不可映射字符 * <p>delete complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:12: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:12: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:49: 错误: 编码GBK的不可映射字符 * 璁剧疆arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:49: 错误: 编码GBK的不可映射字符 * 璁剧疆arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\Delete.java:49: 错误: 编码GBK的不可映射字符 * 璁剧疆arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:13: 错误: 编码GBK的不可映射字符 * <p>deleteResponse complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:13: 错误: 编码GBK的不可映射字符 * <p>deleteResponse complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:13: 错误: 编码GBK的不可映射字符 * <p>deleteResponse complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:15: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:15: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:62: 错误: 编码GBK的不可映射字符 * 鑾峰彇return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:62: 错误: 编码GBK的不可映射字符 * 鑾峰彇return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:62: 错误: 编码GBK的不可映射字符 * 鑾峰彇return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:74: 错误: 编码GBK的不可映射字符 * 璁剧疆return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:74: 错误: 编码GBK的不可映射字符 * 璁剧疆return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:74: 错误: 编码GBK的不可映射字符 * 璁剧疆return灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:87: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:87: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:87: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:89: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:89: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:155: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:155: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:155: 错误: 编码GBK的不可映射字符 * <p>anonymous complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:157: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:157: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:185: 错误: 编码GBK的不可映射字符 * 鑾峰彇key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:185: 错误: 编码GBK的不可映射字符 * 鑾峰彇key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:185: 错误: 编码GBK的不可映射字符 * 鑾峰彇key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:197: 错误: 编码GBK的不可映射字符 * 璁剧疆key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:197: 错误: 编码GBK的不可映射字符 * 璁剧疆key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:197: 错误: 编码GBK的不可映射字符 * 璁剧疆key灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:209: 错误: 编码GBK的不可映射字符 * 鑾峰彇value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:209: 错误: 编码GBK的不可映射字符 * 鑾峰彇value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:209: 错误: 编码GBK的不可映射字符 * 鑾峰彇value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:221: 错误: 编码GBK的不可映射字符 * 璁剧疆value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:221: 错误: 编码GBK的不可映射字符 * 璁剧疆value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\DeleteResponse.java:221: 错误: 编码GBK的不可映射字符 * 璁剧疆value灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:10: 错误: 编码GBK的不可映射字符 * <p>getAppointResult complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:10: 错误: 编码GBK的不可映射字符 * <p>getAppointResult complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:10: 错误: 编码GBK的不可映射字符 * <p>getAppointResult complex type鐨? Java 绫汇?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:12: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:12: 错误: 编码GBK的不可映射字符 * <p>浠ヤ笅妯″紡鐗囨鎸囧畾鍖呭惈鍦ㄦ绫讳腑鐨勯鏈熷唴瀹广?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ C:\Users\weigu\AppData\Local\Temp\org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@ceddaf8-1555314397936-src\com\sd\msun\hospital\service\GetAppointResult.java:37: 错误: 编码GBK的不可映射字符 * 鑾峰彇arg0灞炴?х殑鍊笺?? ^ ```
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
这30个CSS选择器,你必须熟记(上)
关注前端达人,与你共同进步CSS的魅力就是让我们前端工程师像设计师一样进行网页的设计,我们能轻而易举的改变颜色、布局、制作出漂亮的影音效果等等,我们只需要改几行代码,不需...
国产开源API网关项目进入Apache孵化器:APISIX
点击蓝色“程序猿DD”关注我回复“资源”获取独家整理的学习资料!近日,又有一个开源项目加入了这个Java开源界大名鼎鼎的Apache基金会,开始进行孵化器。项目名称:AP...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
编写Spring MVC控制器的14个技巧
本期目录 1.使用@Controller构造型 2.实现控制器接口 3.扩展AbstractController类 4.为处理程序方法指定URL映射 5.为处理程序方法指定HTTP请求方法 6.将请求参数映射到处理程序方法 7.返回模型和视图 8.将对象放入模型 9.处理程序方法中的重定向 10.处理表格提交和表格验证 11.处理文件上传 12.在控制器中自动装配业务类 ...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
求小姐姐抠图竟遭白眼?痛定思痛,我决定用 Python 自力更生!
点击蓝色“Python空间”关注我丫加个“星标”,每天一起快乐的学习大家好,我是 Rocky0429,一个刚恰完午饭,正在用刷网页浪费生命的蒟蒻...一堆堆无聊八卦信息的网页内容慢慢使我的双眼模糊,一个哈欠打出了三斤老泪,就在此时我看到了一张图片:是谁!是谁把我女朋友的照片放出来的!awsl!太好看了叭...等等,那个背景上的一堆鬼画符是什么鬼?!真是看不下去!叔叔婶婶能忍,隔壁老王的三姨妈的四表...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
相关热词 c# plc s1200 c#里氏转换原则 c# 主界面 c# do loop c#存为组套 模板 c# 停掉协程 c# rgb 读取图片 c# 图片颜色调整 最快 c#多张图片上传 c#密封类与密封方法
立即提问