hlf hace 1 año
padre
commit
36cc7d40a5

+ 2 - 1
src/main/java/com/gyee/table/TableApp.java

@@ -3,8 +3,9 @@ package com.gyee.table;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 
-@SpringBootApplication
+@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
 @MapperScan("com.gyee.table.mapper")
 public class TableApp {
 

+ 0 - 4
src/main/java/com/gyee/table/entity/ComponentModificationRecord.java

@@ -2,8 +2,6 @@ package com.gyee.table.entity;
 
 import lombok.Data;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
 import javax.persistence.Table;
 
 /**
@@ -12,11 +10,9 @@ import javax.persistence.Table;
  * 文件说明:
  */
 @Data
-@Entity
 @Table(name="component_modification_record")
 public class ComponentModificationRecord {
 
-    @Id
     private String id;
     private String updataDate;
     private String changeUser;

+ 0 - 4
src/main/java/com/gyee/table/entity/Configurationinfo.java

@@ -2,8 +2,6 @@ package com.gyee.table.entity;
 
 import lombok.Data;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
 import javax.persistence.Table;
 
 /**
@@ -12,11 +10,9 @@ import javax.persistence.Table;
  * 文件说明:
  */
 @Data
-@Entity
 @Table(name="configurationinfo")
 public class Configurationinfo {
 
-    @Id
     private String id;
     //组件名称(筛选)
     private String name;

+ 0 - 4
src/main/java/com/gyee/table/entity/Line.java

@@ -2,8 +2,6 @@ package com.gyee.table.entity;
 
 import lombok.Data;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
 import javax.persistence.Table;
 
 /**
@@ -12,11 +10,9 @@ import javax.persistence.Table;
  * 文件说明:
  */
 @Data
-@Entity
 @Table(name="line")
 public class Line {
 
-    @Id
     private String id;
     private String code;
     private String name;

+ 0 - 4
src/main/java/com/gyee/table/entity/Project.java

@@ -2,8 +2,6 @@ package com.gyee.table.entity;
 
 import lombok.Data;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
 import javax.persistence.Table;
 
 /**
@@ -12,11 +10,9 @@ import javax.persistence.Table;
  * 文件说明:
  */
 @Data
-@Entity
 @Table(name="project")
 public class Project {
 
-    @Id
     private String id;
     private String code;
     private String name;

+ 0 - 4
src/main/java/com/gyee/table/entity/SysUser.java

@@ -2,8 +2,6 @@ package com.gyee.table.entity;
 
 import lombok.Data;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
 import javax.persistence.Table;
 
 /**
@@ -12,11 +10,9 @@ import javax.persistence.Table;
  * 文件说明:
  */
 @Data
-@Entity
 @Table(name="sys_user")
 public class SysUser {
 
-    @Id
     private String id;
     //用户名
     private String loginName;

+ 0 - 4
src/main/java/com/gyee/table/entity/Windpowerstation.java

@@ -2,8 +2,6 @@ package com.gyee.table.entity;
 
 import lombok.Data;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
 import javax.persistence.Table;
 
 /**
@@ -12,11 +10,9 @@ import javax.persistence.Table;
  * 文件说明:
  */
 @Data
-@Entity
 @Table(name="windpowerstation")
 public class Windpowerstation {
 
-    @Id
     private String id;
     private String code;
     private String name;

+ 0 - 4
src/main/java/com/gyee/table/entity/Windturbine.java

@@ -2,8 +2,6 @@ package com.gyee.table.entity;
 
 import lombok.Data;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
 import javax.persistence.Table;
 
 /**
@@ -12,11 +10,9 @@ import javax.persistence.Table;
  * 文件说明:
  */
 @Data
-@Entity
 @Table(name="windturbine")
 public class Windturbine {
 
-    @Id
     private String id;
     private String code;
     private String windpowerstationid;

+ 1 - 1
src/main/java/com/gyee/table/service/impl/ConfigurationinfoServiceImpl.java

@@ -17,7 +17,7 @@ import java.util.List;
 @Service
 public class ConfigurationinfoServiceImpl extends ServiceImpl<ConfigurationinfoMapper, Configurationinfo> implements IConfigurationinfoService {
 
-    @Autowired(required = false)
+    @Autowired
     private ConfigurationinfoMapper configurationinfoMapper;
 
     @Override

+ 1 - 1
src/main/java/com/gyee/table/service/impl/LineServiceImpl.java

@@ -17,7 +17,7 @@ import java.util.List;
 @Service
 public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements ILineService {
 
-    @Autowired(required = false)
+    @Autowired
     private LineMapper lineMapper;
 
     @Override

+ 1 - 1
src/main/java/com/gyee/table/service/impl/ProjectServiceImpl.java

@@ -17,7 +17,7 @@ import java.util.List;
 @Service
 public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService {
 
-    @Autowired(required = false)
+    @Autowired
     private ProjectMapper projectMapper;
 
     @Override

+ 1 - 1
src/main/java/com/gyee/table/service/impl/SysUserServiceImpl.java

@@ -15,7 +15,7 @@ import org.springframework.stereotype.Service;
 @Service
 public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
 
-    @Autowired(required = false)
+    @Autowired
     private SysUserMapper userMapper;
 
     @Override

+ 1 - 1
src/main/java/com/gyee/table/service/impl/WindturbineServiceImpl.java

@@ -17,7 +17,7 @@ import java.util.List;
 @Service
 public class WindturbineServiceImpl extends ServiceImpl<WindturbineMapper, Windturbine> implements IWindturbineService {
 
-    @Autowired(required = false)
+    @Autowired
     private WindturbineMapper windturbineMapper;
 
     @Override

+ 9 - 7
src/main/resources/application.yml

@@ -10,17 +10,19 @@ spring:
         charset: UTF-8
         enabled: true
   datasource:
-#    driver-class-name: com.mysql.cj.jdbc.Driver
-#    url: jdbc:mysql://49.234.50.218:3306/list
-#    url: jdbc:mysql://123.60.219.66:3306/configuration_software?default-character-set=utf8
-#    url: jdbc:mysql://192.168.1.69/wisdom_cs?useUnicode=true&characterEncoding=UTF-8
-#    username: root
-#    password: gyeepd@123
+    #driver-class-name: com.mysql.cj.jdbc.Driver
+    #url: jdbc:mysql://49.234.50.218:3306/list
+    #url: jdbc:mysql://123.60.219.66:3306/configuration_software?default-character-set=utf8
+    #url: jdbc:mysql://192.168.1.69/wisdom_cs?useUnicode=true&characterEncoding=UTF-8
+    #username: root
+    #password: gyeepd@123
     driver-class-name: org.postgresql.Driver
     url: jdbc:postgresql://123.60.219.66:5432/configuration_software
     username: postgres
     password: gyeepd@123
-    type: com.alibaba.druid.pool.DruidDataSource
+    #url: jdbc:postgresql://10.81.3.151:5432/configuration_software
+    #username: postgres
+    #password: postgres
 
 mybatis-plus:
   typeAliasesPackage: com.gyee.table.entity

+ 0 - 13
src/test/java/com/gyee/table/TableApplicationTests.java

@@ -1,13 +0,0 @@
-package com.gyee.table;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest
-class TableApplicationTests {
-
-    @Test
-    void contextLoads() {
-    }
-
-}

+ 0 - 9
src/test/java/com/gyee/table/myTest.java

@@ -1,9 +0,0 @@
-package com.gyee.table;
-
-public class myTest {
-    public static void main(String[] args) {
-        String s = "asd    ssdfasdf";
-        String[] s1 = s.split(" ");
-        System.out.println();
-    }
-}