Browse Source

验证码修改

wanghuan 3 years ago
parent
commit
b7c04a8a62

BIN
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/target/jeecg-system-cloud-api-3.2.0.jar


+ 12 - 12
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/WebSocketConfig.java

@@ -8,15 +8,15 @@ import org.springframework.web.socket.server.standard.ServerEndpointExporter;
  * @Description: WebSocketConfig
  * @author: jeecg-boot
  */
-//@Configuration
-//public class WebSocketConfig {
-//    /**
-//     * 	注入ServerEndpointExporter,
-//     * 	这个bean会自动注册使用了@ServerEndpoint注解声明的Websocket endpoint
-//     */
-//    @Bean
-//    public ServerEndpointExporter serverEndpointExporter() {
-//        return new ServerEndpointExporter();
-//    }
-//
-//}
+@Configuration
+public class WebSocketConfig {
+    /**
+     * 	注入ServerEndpointExporter,
+     * 	这个bean会自动注册使用了@ServerEndpoint注解声明的Websocket endpoint
+     */
+    @Bean
+    public ServerEndpointExporter serverEndpointExporter() {
+        return new ServerEndpointExporter();
+    }
+
+}

BIN
jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.2.0.jar


BIN
jeecg-boot-module-demo/target/jeecg-boot-module-demo-3.2.0.jar


+ 27 - 27
jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java

@@ -23,30 +23,6 @@ import java.net.UnknownHostException;
 @Slf4j
 @SpringBootApplication
 @EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
-//public class JeecgSystemApplication extends SpringBootServletInitializer {
-//
-//    @Override
-//    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
-//        return application.sources(JeecgSystemApplication.class);
-//    }
-//
-//    public static void main(String[] args) throws UnknownHostException {
-//        ConfigurableApplicationContext application = SpringApplication.run(JeecgSystemApplication.class, args);
-//        Environment env = application.getEnvironment();
-//        String ip = InetAddress.getLocalHost().getHostAddress();
-//        String port = env.getProperty("server.port");
-//        String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
-//        log.info("\n----------------------------------------------------------\n\t" +
-//                "Application Jeecg-Boot is running! Access URLs:\n\t" +
-//                "Local: \t\thttp://localhost:" + port + path + "/\n\t" +
-//                "External: \thttp://" + ip + ":" + port + path + "/\n\t" +
-//                "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
-//                "----------------------------------------------------------");
-//
-//    }
-//
-//}
-
 public class JeecgSystemApplication extends SpringBootServletInitializer {
 
     @Override
@@ -54,8 +30,32 @@ public class JeecgSystemApplication extends SpringBootServletInitializer {
         return application.sources(JeecgSystemApplication.class);
     }
 
+    public static void main(String[] args) throws UnknownHostException {
+        ConfigurableApplicationContext application = SpringApplication.run(JeecgSystemApplication.class, args);
+        Environment env = application.getEnvironment();
+        String ip = InetAddress.getLocalHost().getHostAddress();
+        String port = env.getProperty("server.port");
+        String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
+        log.info("\n----------------------------------------------------------\n\t" +
+                "Application Jeecg-Boot is running! Access URLs:\n\t" +
+                "Local: \t\thttp://localhost:" + port + path + "/\n\t" +
+                "External: \thttp://" + ip + ":" + port + path + "/\n\t" +
+                "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
+                "----------------------------------------------------------");
 
-    public static void main(String[] args) {
-        SpringApplication.run(JeecgSystemApplication.class, args);
     }
-}
+
+}
+
+//public class JeecgSystemApplication extends SpringBootServletInitializer {
+//
+//    @Override
+//    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+//        return application.sources(JeecgSystemApplication.class);
+//    }
+//
+//
+//    public static void main(String[] args) {
+//        SpringApplication.run(JeecgSystemApplication.class, args);
+//    }
+//}

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java

@@ -445,7 +445,7 @@ public class LoginController {
 	 * @param response
 	 * @param key
 	 */
-	@CrossOrigin(origins = "*",maxAge = 3600)
+//	@CrossOrigin(origins = "*",maxAge = 3600)
 	@ApiOperation("获取验证码")
 	@GetMapping(value = "/randomImage/{key}")
 	public Result<String> randomImage(HttpServletResponse response,@PathVariable("key") String key){

+ 1 - 1
jeecg-boot-module-system/target/classes/application.yml

@@ -2,4 +2,4 @@ spring:
   application:
     name: jeecg-system
   profiles:
-    active: 'prod'
+    active: 'dev'

BIN
jeecg-boot-module-system/target/classes/org/jeecg/JeecgSystemApplication.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/system/controller/LoginController.class