Commit f6bbbfbb by zhoujinghao

配置文件修改

1 parent 60efc1fb
...@@ -36,6 +36,11 @@ ...@@ -36,6 +36,11 @@
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId> <artifactId>pagehelper-spring-boot-starter</artifactId>
</dependency> </dependency>
<!--Mysql数据库驱动-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--MyBatis分页插件--> <!--MyBatis分页插件-->
<dependency> <dependency>
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>
......
...@@ -4,10 +4,11 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -4,10 +4,11 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.nafmii.nafmiiadmin.po.TStudent; import org.nafmii.nafmiiadmin.po.TStudent;
import org.nafmii.nafmiiadmin.po.TStudentExample; import org.nafmii.nafmiiadmin.po.TStudentExample;
import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
@Mapper @Repository
public interface TStudentMapper { public interface TStudentMapper {
long countByExample(TStudentExample example); long countByExample(TStudentExample example);
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nafmii.nafmiimbg.mapper.TStudentMapper"> <mapper namespace="org.nafmii.nafmiiadmin.mapper.TStudentMapper">
<resultMap id="BaseResultMap" type="org.nafmii.nafmiiadmin.po.TStudent"> <resultMap id="BaseResultMap" type="org.nafmii.nafmiiadmin.po.TStudent">
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
......
...@@ -109,6 +109,10 @@ ...@@ -109,6 +109,10 @@
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId> <artifactId>spring-boot-admin-starter-server</artifactId>
</dependency> </dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--Knife4j API文档生产工具--> <!--Knife4j API文档生产工具-->
<dependency> <dependency>
<groupId>com.github.xiaoymin</groupId> <groupId>com.github.xiaoymin</groupId>
......
...@@ -7,7 +7,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient; ...@@ -7,7 +7,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @SpringBootApplication()
@EnableEurekaClient @EnableEurekaClient
@EnableSwagger2 @EnableSwagger2
@EnableFeignClients @EnableFeignClients
......
...@@ -8,4 +8,9 @@ logging.pattern.dateformat=yyyy-MM-dd hh:MM:ss ...@@ -8,4 +8,9 @@ logging.pattern.dateformat=yyyy-MM-dd hh:MM:ss
eureka.client.serviceUrl.defaultZone=http://127.0.0.1:8761/eureka eureka.client.serviceUrl.defaultZone=http://127.0.0.1:8761/eureka
eureka.instance.statusPageUrl = http://127.0.0.1:8002/swagger-ui.html eureka.instance.statusPageUrl = http://127.0.0.1:8002/swagger-ui.html
eureka.instance.prefer-ip-address = true eureka.instance.prefer-ip-address = true
eureka.instance.instance-id = ${spring.cloud.client.ip-address}:${server.port}
\ No newline at end of file \ No newline at end of file
eureka.instance.instance-id = ${spring.cloud.client.ip-address}:${server.port}
spring.datasource.url=jdbc:mysql://140.143.249.40:3308/edz?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.password=123456
spring.datasource.username=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
mybatis.mapper-locations=classpath:mapper/*.xml
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!