Merge branch 'main' of ssh://nio17.ulstu.ru:22023/sam.Teaching/DockerProject
This commit is contained in:
commit
c8502a703d
@ -0,0 +1,14 @@
|
|||||||
|
package ru.ulstu.is.sbapp.configuration;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class PasswordEncoderConfiguration {
|
||||||
|
@Bean
|
||||||
|
public PasswordEncoder createPasswordEncoder() {
|
||||||
|
return new BCryptPasswordEncoder();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package ru.ulstu.is.sbapp.speaker.configuration;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import ru.ulstu.is.sbapp.speaker.domain.Speaker;
|
||||||
|
import ru.ulstu.is.sbapp.speaker.domain.SpeakerEng;
|
||||||
|
import ru.ulstu.is.sbapp.speaker.domain.SpeakerRus;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class SpeakerConfiguration {
|
||||||
|
private final Logger log = LoggerFactory.getLogger(SpeakerConfiguration.class);
|
||||||
|
|
||||||
|
@Bean(value = "ru", initMethod = "init", destroyMethod = "destroy")
|
||||||
|
public SpeakerRus createRusSpeaker() {
|
||||||
|
log.info("Call createRusSpeaker()");
|
||||||
|
return new SpeakerRus();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean(value = "en")
|
||||||
|
public Speaker createEngSpeaker() {
|
||||||
|
log.info("Call createEngSpeaker()");
|
||||||
|
return new SpeakerEng();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package ru.ulstu.is.sbapp.student.service;
|
||||||
|
|
||||||
|
public class StudentNotFoundException extends RuntimeException {
|
||||||
|
public StudentNotFoundException(Long id) {
|
||||||
|
super(String.format("Student with id [%s] is not found", id));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user