网上查了一些资料说是
test
package com.ttxq.tt;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class TtApplicationTests {
// @Test
// public void contextLoads() {
// }
}
方法名不能大小写,我本来就不是大写呀****,改成大写没用,全部注释掉,也没用。。。遗留问题。。
Connected to the target VM, address: '127.0.0.1:58583', transport: 'socket'
"C:\Program Files\Java\jdk1.8.0_161\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:58583,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=58582 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -
……………………
Connected to the target VM, address: '127.0.0.1:58583', transport: 'socket'
这个端口被占用了但是没有找到很好的解决办法。。。(查看58583 端口一个是被java.exe 占用一个是被idea占用,但是关闭idea的项目之后java.exe也不占用了,我想应该是有什么地方需要配置才可以,,但是。。。。)
-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:58583
配置文件的问题,去掉这一行不报错了(而且不去掉这一行日志也不会写到文件里面去***)
<configurationFile>${basedir}/src/main/resources/log4j2/log4j2.xml</configurationFile>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<!--
<configurationFile>${basedir}/src/main/resources/log4j2/log4j2.xml</configurationFile>-->
<configurationFile>${basedir}/src/main/resources/generator/generatorConfig.xml</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
</plugin>
下一步怎怎么搞。。。很奇怪的是这个报错。。哎呦。。南辕北辙
application.properties 配置log4j2路径 完美搞定。。。
logging.config=classpath:log4j2/log4j2.xml
不得不说,springboot的文件配置还是在 application.properties 比较靠谱。