Commit 4bc2c299 authored by Gwofoo's avatar Gwofoo

排查@Value注解的问题

parent 13b48676
...@@ -67,7 +67,7 @@ public class ToolLibraryResource { ...@@ -67,7 +67,7 @@ public class ToolLibraryResource {
@ApiOperation(httpMethod = "GET", value = "导出", notes = "导出二级组件中的所有工具的SQL") @ApiOperation(httpMethod = "GET", value = "导出", notes = "导出二级组件中的所有工具的SQL")
public void exportComponentSQL( public void exportComponentSQL(
@RequestParam(value = "sequenceNbr") String sequenceNbr, @RequestParam(value = "sequenceNbr") String sequenceNbr,
HttpServletResponse httpServletResponse) throws ClassNotFoundException, SQLException { HttpServletResponse httpServletResponse) {
toolLibraryService.exportComponentSQL(sequenceNbr, httpServletResponse); toolLibraryService.exportComponentSQL(sequenceNbr, httpServletResponse);
} }
......
...@@ -24,18 +24,25 @@ import java.util.*; ...@@ -24,18 +24,25 @@ import java.util.*;
@Service @Service
public class ToolLibraryService extends BaseService<ToolLibraryModel, ToolLibrary,ToolLibraryMapper> { public class ToolLibraryService extends BaseService<ToolLibraryModel, ToolLibrary,ToolLibraryMapper> {
private final String className = "com.mysql.cj.jdbc.Driver";
@Value("${toolLibrary.className}") private final String url = "jdbc:mysql://172.16.3.18:3306/amos_studio";
private String className;
@Value("${toolLibrary.url}") private final String userName = "root";
private String url;
@Value("${toolLibrary.userName}") private final String passWord = "Yeejoin@2020";
private String userName;
@Value("${toolLibrary.passWord}") // @Value("${toolLibrary.className}")
private String passWord; // private String className;
//
// @Value("${toolLibrary.url}")
// private String url;
//
// @Value("${toolLibrary.userName}")
// private String userName;
//
// @Value("${toolLibrary.passWord}")
// private String passWord;
/** /**
* 由一级到二级 * 由一级到二级
......
...@@ -56,7 +56,7 @@ management.security.enabled=false ...@@ -56,7 +56,7 @@ management.security.enabled=false
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
toolLibrary.className=com.mysql.cj.jdbc.Driver #toolLibrary.className=com.mysql.cj.jdbc.Driver
toolLibrary.url=jdbc:mysql://172.16.3.18:3306/amos_studio #toolLibrary.url=jdbc:mysql://172.16.3.18:3306/amos_studio
toolLibrary.userName=root #toolLibrary.userName=root
toolLibrary.passWord=Yeejoin@2020 #toolLibrary.passWord=Yeejoin@2020
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment