第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Spring Boot + LocalDate:“無(wú)主構(gòu)造函數(shù)或默認(rèn)構(gòu)造函數(shù)”

Spring Boot + LocalDate:“無(wú)主構(gòu)造函數(shù)或默認(rèn)構(gòu)造函數(shù)”

慕的地6264312 2021-07-20 21:16:48
我<input type="date" ...>為 Spring Boot 應(yīng)用程序創(chuàng)建了一個(gè)簡(jiǎn)單的表單。我想把它變成LocalDate控制器中的一個(gè)。我收到錯(cuò)誤:Fri Aug 17 15:32:01 CEST 2018There was an unexpected error (type=Internal Server Error, status=500).No primary or default constructor found for class java.time.LocalDate這當(dāng)然是正確的,但是 - 據(jù)我所知 - 應(yīng)該無(wú)關(guān)緊要,因?yàn)楦鶕?jù)文檔:“[...]@DateTimeFormat注釋應(yīng)該適用java.time于 Java 8 和 Spring 4?!笨刂破鞣椒ǎ篅PostMapping("/users")public String register(String user, String pw, @DateTimeFormat(iso=DateTimeFormat.ISO.DATE) LocalDate beginning){    MyUser myUser = MyUser.create(user,pw);    MyUser.setEnabled(beginning);    repo.register(myUser);    return "redirect:/users/"+user;}HTML/百里香葉:<form method="POST"><div><label> Benutzername : <input type="text" name="user"/> </label></div><div><label> Passwort: <input type="password" name="password"/> </label></div><div><label> Freigeschaltet ab (optional): <input type="date" name="beginning"/> </label></div><div><input type="submit" value="Registrieren"/></div></form>pom(摘錄) <dependencyManagement>    <dependencies>        <dependency>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-dependencies</artifactId>            <version>2.0.4.RELEASE</version>            <type>pom</type>            <scope>import</scope>        </dependency>    </dependencies></dependencyManagement><dependencies>    <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-thymeleaf</artifactId>    </dependency>    <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-web</artifactId>    </dependency>...</dependencies>   <properties>    <java.version>1.8</java.version></properties>
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 236 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)