正在显示
7 个修改的文件
包含
55 行增加
和
4 行删除
readMe.md
0 → 100644
| @@ -15,10 +15,10 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; | @@ -15,10 +15,10 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
| 15 | //@EnableEurekaClient | 15 | //@EnableEurekaClient |
| 16 | @EnableTransactionManagement | 16 | @EnableTransactionManagement |
| 17 | @MapperScan("com.tianbo.imfClient.dao") | 17 | @MapperScan("com.tianbo.imfClient.dao") |
| 18 | -public class WarehouseApplication { | 18 | +public class ImfClientApplication { |
| 19 | 19 | ||
| 20 | public static void main(String[] args) { | 20 | public static void main(String[] args) { |
| 21 | - SpringApplication.run(WarehouseApplication.class, args); | 21 | + SpringApplication.run(ImfClientApplication.class, args); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | } | 24 | } |
| 1 | +package com.tianbo.imfClient.config; | ||
| 2 | + | ||
| 3 | +import org.springframework.context.annotation.Bean; | ||
| 4 | +import org.springframework.context.annotation.Configuration; | ||
| 5 | +import org.springframework.web.socket.server.standard.ServerEndpointExporter; | ||
| 6 | + | ||
| 7 | +@Configuration | ||
| 8 | +public class WebSocketConfig { | ||
| 9 | + @Bean | ||
| 10 | + public ServerEndpointExporter serverEndpointExporter() { | ||
| 11 | + return new ServerEndpointExporter(); | ||
| 12 | + } | ||
| 13 | +} |
| 1 | +package com.tianbo.imfClient.controller; | ||
| 2 | + | ||
| 3 | +import org.springframework.stereotype.Controller; | ||
| 4 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 5 | + | ||
| 6 | +@Controller | ||
| 7 | +public class ErrorController { | ||
| 8 | + | ||
| 9 | + @RequestMapping("/error1") | ||
| 10 | + public String error(){ | ||
| 11 | + return "error"; | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | +} |
| 1 | +package com.tianbo.imfClient.controller; | ||
| 2 | + | ||
| 3 | +import org.springframework.stereotype.Controller; | ||
| 4 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 5 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
| 6 | + | ||
| 7 | +@Controller | ||
| 8 | +public class ImfLogController { | ||
| 9 | + | ||
| 10 | + | ||
| 11 | + @RequestMapping("/log/imf") | ||
| 12 | + public String IMFlog(){ | ||
| 13 | + return "/log/imf.html"; | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | + | ||
| 17 | +} | ||
| 18 | + |
| @@ -23,7 +23,7 @@ public class IMF_Task { | @@ -23,7 +23,7 @@ public class IMF_Task { | ||
| 23 | public static String isNeedSend = "N"; | 23 | public static String isNeedSend = "N"; |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | - @Scheduled(fixedRate = 5000) | 26 | +// @Scheduled(fixedRate = 5000) |
| 27 | private static void start() throws Exception { | 27 | private static void start() throws Exception { |
| 28 | PropertyConfigurator.configure("config/log4j.properties"); | 28 | PropertyConfigurator.configure("config/log4j.properties"); |
| 29 | client = IMFClientFactory.createInstance(); | 29 | client = IMFClientFactory.createInstance(); |
| @@ -7,7 +7,7 @@ server.servlet.context-path=${SERVER_CONTEXTPATH:} | @@ -7,7 +7,7 @@ server.servlet.context-path=${SERVER_CONTEXTPATH:} | ||
| 7 | web.upload-path=upload/ | 7 | web.upload-path=upload/ |
| 8 | #表示所有的访问经过静态资源路径 | 8 | #表示所有的访问经过静态资源路径 |
| 9 | springboot.mvc.static-path-pattern=/** | 9 | springboot.mvc.static-path-pattern=/** |
| 10 | -spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,file:${web.upload-path} | 10 | +spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/static,classpath:/resources/,classpath:/templates/,file:${web.upload-path} |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 |
-
请 注册 或 登录 后发表评论