Я умею создавать обычную таблицу в БД , где уже есть определенные столбцы и не знаю как ее расширять по необходимости.
Для анкеты необходимо создавать несколько таблиц (Для названия анкеты, названия ее вопросов и вариантов ответа) или все это лучше запихнуть в одну таблицу?
import java.util.List;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"markers_restarted",
"photo",
"sizes",
"latitude",
"longitude",
"kid",
"sizes2",
"urls",
"urls2"
})
@Generated("jsonschema2pojo")
public class Photos {
@JsonProperty("markers_restarted")
public Boolean markersRestarted;
@JsonProperty("photo")
public String photo;
@JsonProperty("sizes")
public List<Object> sizes = null;
@JsonProperty("latitude")
public Integer latitude;
@JsonProperty("longitude")
public Integer longitude;
@JsonProperty("kid")
public String kid;
@JsonProperty("sizes2")
public List<List<String>> sizes2 = null;
@JsonProperty("urls")
public List<Object> urls = null;
@JsonProperty("urls2")
public List<String> urls2 = null;
}
import java.util.List;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"server",
"photos_list",
"aid",
"hash"
})
@Generated("jsonschema2pojo")
public class Example {
@JsonProperty("server")
public Integer server;
@JsonProperty("photos_list")
public List<Photos> photosList = null;
@JsonProperty("aid")
public Integer aid;
@JsonProperty("hash")
public String hash;
}
@ControllerAdvice
или же обработать на уровне контроллера.@ExceptionHandler
Вопрос заключается в том, как обработать данное исключение, чтобы получить сообщение из исключения и поместить его во вьюшку?
/login
.antMatchers("/").permitAll()
.antMatchers("/login").permitAll()
/auth
.loginPage("/auth")
action="@{/auth}"
А отправлять запрос на указанный урл вам просто не разрешено и вы получите 403 permission denied..antMatchers("/auth").permitAll()
<version>Latest</version>
, вместо Latest должна быть версия.Converter<S, T>
для конвертации dto в entity This can be done in many ways. We will be discussing the following with examples.
GenericBeanDefinition
BeanDefinitionBuilder
BeanFactoryPostProcessor
BeanDefinitionRegistryPostProcessor
It is impossible to click iframe directly through XPath since it is an iframe. First we have to switch to the frame and then we can click using xpath.
driver.switchTo().frame("a077aa5e");
Я использую properties-файлы, в которых на нужном языке пишу текст. Нужно проверить, чтобы текст в данных файлах был установлен как UTF-8
<head>
<meta charset="UTF-8">
</head>
Или браузер например открыть.
java selenium {ваш_браузер}
ObservableList<String>
названий из вашего List<T>
и вывести его: