1. 程式人生 > >SpringBoot踩過的坑

SpringBoot踩過的坑

一直聽說SpringBoot開發多快捷多麼好是一個小型的分散式框架,不像Spring那樣要寫繁多的配置檔案, 心血來潮本著玩一玩的心態,寫下了第一個SpringBoot程式,按照網上的資料看起來很簡單嘛,信心滿滿的就開始幹,卻沒曾想到問題一個一個接踵而來現在來重現下我遇到的幾個問題。

首先建立一個maven project 結構如下:

這裡寫圖片描述

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <groupId>com.main</groupId> <artifactId>SpringBoot</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version>
<name>SpringBoot Maven Webapp</name> <url>http://maven.apache.org</url> <!-- Inherit defaults from Spring Boot --> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId
>
<version>1.4.3.BUILD-SNAPSHOT</version> </parent> <!-- Add typical dependencies for a web application --> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> </dependency> </dependencies> <!-- Package as an executable jar --> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> <!-- Add Spring repositories --> <!-- (you don't need this if you are using a .RELEASE version) --> <repositories> <repository> <id>spring-snapshots</id> <url>http://repo.spring.io/snapshot</url> <snapshots><enabled>true</enabled></snapshots> </repository> <repository> <id>spring-milestones</id> <url>http://repo.spring.io/milestone</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>spring-snapshots</id> <url>http://repo.spring.io/snapshot</url> </pluginRepository> <pluginRepository> <id>spring-milestones</id> <url>http://repo.spring.io/milestone</url> </pluginRepository> </pluginRepositories> </project>

以上在maven install時候會報錯:
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 4.604s
[INFO] Finished at: Mon Aug 15 18:14:25 CST 2016
[INFO] Final Memory: 22M/226M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.0.RELEASE:repackage (default) on project beenoisy-spring-boot-way:
Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.4.0.RELEASE:
repackage failed: Unable to find a single main class from the following candidates
[
com.beenoisy.springboot.way.BeenoisySpringBootWayApplication,
com.beenoisy.springboot.way.TestConflict
] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging

原因是不找到唯一的一個入口類
解決方法 : 加上

 <properties>
        <start-class>com.beenoisy.springboot.way.BeenoisySpringBootWayApplication</start-class>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

如果這時專案上還有小紅叉的話:報錯Error parsing lifecycle processing instructions

1.將pom.xml maven clean然後再選擇專案名上右鍵選擇maven->update project 再重新install
2. 如果還是報錯
可以嘗試將專案匯出然後刪除然後再倒入,我個人沒有嘗試成功
3、專案上顯示個紅叉叉,不影響執行,但是對於強迫的人來說受不鳥
通過Window -> Show View -> Problems 將Maven Problems報的這些錯直接delete

Application.java

package com.springBoot.main;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Application {
    public static void main(String[] args) {
            SpringApplication.run(Application.class, args);
    }
}

Example.java

package com.springBoot.main;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableAutoConfiguration
public class Example {
     @RequestMapping("/")  
        String home() {  
            return "Hello World!";  
        }  

        @RequestMapping("/hello/{myName}")  
        String index(@PathVariable String myName) {  
            return "Hello "+myName+"!!!";  
        }  
}

執行Application.java是報錯如下:
這裡寫圖片描述

錯誤的原因是專案中匯入了本地tomcat的jar,將tomcat 直接remove就可以了。

最後終於可以愉快的跑起來我的第一個SpringBoot程式了

執行 Application.java


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::  (v1.4.3.BUILD-SNAPSHOT)

2017-08-11 21:42:28.328  INFO 23900 --- [           main] com.springBoot.main.Application          : Starting Application on DESKTOP-MQSHI7G with PID 23900 (C:\EclipseWorkPlace\SpringBoot\target\classes started by 胖大星 in C:\EclipseWorkPlace\SpringBoot)
2017-08-11 21:42:28.333  INFO 23900 --- [           main] com.springBoot.main.Application          : No active profile set, falling back to default profiles: default
2017-08-11 21:42:28.450  INFO 23900 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot[email protected]34b7ac2f: startup date [Fri Aug 11 21:42:28 CST 2017]; root of context hierarchy
2017-08-11 21:42:31.268  INFO 23900 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-08-11 21:42:31.303  INFO 23900 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2017-08-11 21:42:31.305  INFO 23900 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.6
2017-08-11 21:42:31.483  INFO 23900 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-08-11 21:42:31.483  INFO 23900 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3038 ms
2017-08-11 21:42:31.691  INFO 23900 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-08-11 21:42:31.711  INFO 23900 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-08-11 21:42:31.712  INFO 23900 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-08-11 21:42:31.712  INFO 23900 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-08-11 21:42:31.713  INFO 23900 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-08-11 21:42:32.101  INFO 23900 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot[email protected]34b7ac2f: startup date [Fri Aug 11 21:42:28 CST 2017]; root of context hierarchy
2017-08-11 21:42:32.207  INFO 23900 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello/{myName}]}" onto java.lang.String com.springBoot.main.Example.index(java.lang.String)
2017-08-11 21:42:32.208  INFO 23900 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto java.lang.String com.springBoot.main.Example.home()
2017-08-11 21:42:32.212  INFO 23900 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-08-11 21:42:32.213  INFO 23900 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-08-11 21:42:32.252  INFO 23900 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-11 21:42:32.253  INFO 23900 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-11 21:42:32.302  INFO 23900 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-11 21:42:32.491  INFO 23900 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-08-11 21:42:32.540 ERROR 23900 --- [           main] o.a.coyote.http11.Http11NioProtocol      : Failed to start end point associated with ProtocolHandler [http-nio-8080]

java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_101]
    at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_101]
    at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_101]
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_101]
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_101]
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:228) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:874) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:590) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.connector.Connector.startInternal(Connector.java:969) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) [tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:233) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:178) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) [spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at com.springBoot.main.Application.main(Application.java:10) [classes/:na]

2017-08-11 21:42:32.542 ERROR 23900 --- [           main] o.apache.catalina.core.StandardService   : Failed to start connector [Connector[HTTP/1.1-8080]]

org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:233) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:178) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) [spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.3.BUILD-SNAPSHOT.jar:1.4.3.BUILD-SNAPSHOT]
    at com.springBoot.main.Application.main(Application.java:10) [classes/:na]
Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat";  Protocol handler start failed
    at org.apache.catalina.connector.Connector.startInternal(Connector.java:976) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    ... 13 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_101]
    at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_101]
    at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_101]
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_101]
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_101]
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:228) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:874) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:590) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    at org.apache.catalina.connector.Connector.startInternal(Connector.java:969) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    ... 14 common frames omitted

2017-08-11 21:42:32.553  INFO 23900 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2017-08-11 21:42:32.566  INFO 23900 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-08-11 21:42:32.572 ERROR 23900 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.

2017-08-11 21:42:32.573  INFO 23900 --- [           main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot[email protected]34b7ac2f: startup date [Fri Aug 11 21:42:28 CST 2017]; root of context hierarchy
2017-08-11 21:42:32.574  INFO 23900 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

這裡寫圖片描述

看似簡單的程式,實際操作起來問題卻一個接一個。

相關推薦

SpringBoot

一直聽說SpringBoot開發多快捷多麼好是一個小型的分散式框架,不像Spring那樣要寫繁多的配置檔案, 心血來潮本著玩一玩的心態,寫下了第一個SpringBoot程式,按照網上的資料看起來很簡單嘛,信心滿滿的就開始幹,卻沒曾想到問題一個一個接踵而來現

springboot

1、Springboot和mybatis整合後出現了問題。service、dao不能從bean工廠生產出來,找了很多原因,可能是註解失敗等等。 最後在mybatis的對映檔案中找到原因:jdbcType不對,在myeclipse中其實已經報錯了,只是沒有重視,一直在註解上糾結(大多數人都

EclipseSpring外掛不顯示問題,我,分享下

網上最多的說法是版本不相容(spring外掛和eclipse),但是其實大家都不是傻子,都會看對應版本。 所以最多情況還是版本都對的情況下出現外掛不顯示等問題,下面貼出穩穩的安裝外掛和顯示方法; 1、先確定環境,比如eclipse+jdk+spring外掛, 這裡4.5版本的eclipse最好搭

程式設計師,Mybatis你嗎?

摘自:https://yq.aliyun.com/roundtable/49835?&utm_campaign=sys&utm_medium=market&utm_source=edm_email&msctype=email&msca

27.Spring-Boot中攔截器中靜態資源的處理()以及Spring mvc configuring拓展介紹

一.springboot中對靜態資源的處理  預設情況下,springboot提供存放放置靜態資源的資料夾:  /static  /public   /resources  /META-INF/resources 對於maven專案即就是存在src/main/re

SpringBoot整合quartz動態建立定時任務實現以及

需要了解一下quartz有Job,Scheduler,Trigger等概念,在此就不詳細說明 首先說一下功能需求場景 該提醒可以在頁面上進行配置多個,比如可以配置一個提醒:在每天的12點,傳送郵件給某個人,可以繼續配置另外一個提醒:在每個月的10號,給某個人

springboot部分註解以及

1使用Spring Initializer快速建立Spring Boot專案 理解的幾個點: 主類和測試類一定要嚴格按照目錄格式去建立, 2.springboot的主類: /** @SpringBootApplication 來標註一個主程式類,說明這是一個Spring

Springboot使用Filter以及

Springboot使用Filter以及踩過的坑 在Springboot中使用Filter有兩種方式,註解方式,註冊bean方式 一、註解@WebFilter 1、實現Filter介面(javax.servlet) 2、新增@WebFilter註解 3、啟動類新增@ServletComponentS

springboot一個專案多模組打包

其實主要幾點: 切記父檔案不需要打包和對應的模組不要寫下面一段,在主模組寫就行。 因為對應的模組檔案不需要打包,因為我的主模組需要到對應包中的依賴,打包了就找不到了 <build> <plugins>

springboot使用總結,以及

從接觸springboot開始,一路自己摸索,到專案框架的穩定執行,中途踩了不少坑1、攔截器2、全域性異常捕獲處理(@ControllerAdvice)3、捕獲404請求4、整合spring Security登入驗證以及許可權管理    部分程式碼展示5、連線池配置的時候需要

springboot整合jpa(二)

一、org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion(StackOverflowError);nested

spring/springboot傳遞陣列引數和物件引數,@RequestBody使用時的小

其實也不叫坑了,是自己low造成的,以前傳遞引數簡單,都是用的 x-www-form-urlencoded,這次需要傳遞一個複雜一點的,傳遞的是一個實體類加上另一個實體類的list,引數就是(Object1 object1 ,List<Object2> objec

多線程和異步編程示例和實踐-

round 推送 在線 png 很慢 main.c 服務容器 con slist 上兩篇文章,主要介紹了Thread、ThreadPool和TPL 多線程異步編程示例和實踐-Thread和ThreadPool 多線程異步編程示例和實踐-Task 本文中,分享兩則我們在

java使用默認線程池(二)

true 如何 vol private popu command row 由於 ges 雲智慧(北京)科技有限公司 陳鑫 是的。一個線程不可以啟動兩次。那麽它是怎麽推斷的呢? public synchronized void start() {

phpstorm配置xdebug

evel src ini 文件名 文件的 分享 傻傻 自動 配置文件 按網上的諸多教程, 1.下載對應文件,放在php放置執行文件的文件夾 2.更改php.ini文件。一搜,是哪個呢 原先記得好像沒有第一個文件,第二個文件名為,php.ini-development.上網

Mac 下安裝wxpython

blog res alt 指定版本 打開 png ces 點擊 source 一.下載   1.wxpython 下載地址:https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/         

初學spring boot

9.png field ted require order false test boot mysql- 一、搭建spring boot環境   maven工程       pom文件內容 <project xmlns="http://maven

cocos2dx之WebView(android返回鍵處理問題)

lib mar 是否 12px blog tex clas ons 測試的   最近遊戲接入了一個私服平臺,由於沒有sdk,所以支付相關的操作需要在網頁端進行,也就是說點擊充值需要在遊戲內部彈出一個網頁,並定位到平臺充值的地址。查閱相關資料後決定使用cocos2dx自帶的W

總結Idea環境,吐血

你在 搜索 app 服務器 tomcat 點擊 path 詭異 服務 1)首先是JDK環境安裝,這一步千萬要出錯,我就是配錯了CLASSPATH導致了很詭異的問題。可能結果:就是RUN到tomcat不報錯,但是有404錯誤。 2)然後是IDEA安裝,這裏要十分註意如果你選擇

軟件測試曾經

密碼修改 tro 一個 不知道 勝任 兩個 賬號 bsp 提示 原文鏈接:https://www.zhihu.com/question/60591301/answer/209549333 軟件測試曾經踩過的坑? 1.自以為了解業務邏輯,實際浮於表面 這是個深坑