Skip to content

Instantly share code, notes, and snippets.

Controller:
@RestController
class TestController() {
@PostMapping("/url")
fun createNewApartmentAd(@RequestBody createAdRequest: CreateAdRequest) {
...
}
}
12:29:07.402 [main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springfr
amework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServer
Factory bean.
remote: 12:29:07.416 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
remote: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due
to missing ServletWebServerFactory bean.
remote: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:163)
remote: at or
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" version="2.1">
<persistence-unit name="CrudPU" transaction-type="RESOURCE_LOCAL">
<class>crudapp.model.Person</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
@hadson172
hadson172 / dd
Created September 5, 2016 12:20
Product product = new FirstSpecificProduct();
assertTrue(product instanceOf FirstSpecificProduct);
//assertThat(product, instanceOf(FistSpecificProduct.class)) <- błąd kompilacji niezgodne typy