made incomplete misc changes
This commit is contained in:
parent
ba12033e90
commit
8259f6cc49
4 changed files with 51 additions and 6 deletions
|
@ -0,0 +1,14 @@
|
|||
package me.imsonmia.epqapi.config;
|
||||
|
||||
import org.hibernate.dialect.MariaDBDialect;
|
||||
|
||||
/**
|
||||
* MySQLCustomDialect
|
||||
*/
|
||||
public class MySQLCustomDialect extends MariaDBDialect {
|
||||
// https://stackoverflow.com/questions/42430786/how-to-set-collation-for-table-attribute-as-utf8-bin-in-either-annotation-or-app#54993738
|
||||
@Override
|
||||
public String getTableTypeString() {
|
||||
return " ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci";
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package me.imsonmia.epqapi.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
|
||||
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
||||
|
@ -10,12 +11,12 @@ import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerCo
|
|||
@EnableWebSocketMessageBroker
|
||||
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||
@Override
|
||||
public void configureMessageBroker(MessageBrokerRegistry registry) {
|
||||
public void configureMessageBroker(@NonNull MessageBrokerRegistry registry) {
|
||||
registry.enableSimpleBroker("/sub");
|
||||
registry.setApplicationDestinationPrefixes("/app");
|
||||
}
|
||||
@Override
|
||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||
public void registerStompEndpoints(@NonNull StompEndpointRegistry registry) {
|
||||
registry.addEndpoint("/ws").setAllowedOrigins("*");
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package me.imsonmia.epqapi.view;
|
||||
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||
import jakarta.persistence.criteria.CriteriaQuery;
|
||||
import jakarta.persistence.criteria.Predicate;
|
||||
import jakarta.persistence.criteria.Root;
|
||||
import me.imsonmia.epqapi.model.Message;
|
||||
|
||||
public class MessageSpecification implements Specification {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Predicate toPredicate(Root root, CriteriaQuery query, CriteriaBuilder builder) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue