mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Fix test
This commit is contained in:
parent
12832b0a91
commit
7d4f51b3ea
@ -16,7 +16,6 @@ import org.springframework.web.servlet.view.JstlView;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
@ImportResource(value = {"classpath:spring/wisemapping-servlet.xml"})
|
|
||||||
@ComponentScan("com.wisemapping.webmvc")
|
@ComponentScan("com.wisemapping.webmvc")
|
||||||
public class MvcAppConfig implements WebMvcConfigurer {
|
public class MvcAppConfig implements WebMvcConfigurer {
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,7 +11,6 @@ import org.springframework.security.web.SecurityFilterChain;
|
|||||||
import org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher;
|
import org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher;
|
||||||
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
|
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebSecurity
|
@EnableWebSecurity
|
||||||
public class MvcSecurityConfig {
|
public class MvcSecurityConfig {
|
||||||
@ -19,7 +18,6 @@ public class MvcSecurityConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
@Order(1)
|
@Order(1)
|
||||||
public SecurityFilterChain embeddedDisabledXOrigin(@NotNull final HttpSecurity http, @NotNull final MvcRequestMatcher.Builder mvc) throws Exception {
|
public SecurityFilterChain embeddedDisabledXOrigin(@NotNull final HttpSecurity http, @NotNull final MvcRequestMatcher.Builder mvc) throws Exception {
|
||||||
|
|
||||||
http
|
http
|
||||||
.securityMatchers((matchers) ->
|
.securityMatchers((matchers) ->
|
||||||
matchers.requestMatchers(mvc.pattern("/c/maps/*/embed")))
|
matchers.requestMatchers(mvc.pattern("/c/maps/*/embed")))
|
||||||
|
@ -53,7 +53,7 @@ public class AccountController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private LabelService labelService;
|
private LabelService labelService;
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "account/password", consumes = {"text/plain"})
|
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/password", consumes = {"text/plain"})
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changePassword(@RequestBody String password) throws PasswordTooLongException {
|
public void changePassword(@RequestBody String password) throws PasswordTooLongException {
|
||||||
if (password == null) {
|
if (password == null) {
|
||||||
@ -75,7 +75,7 @@ public class AccountController extends BaseController {
|
|||||||
return new RestUser(user);
|
return new RestUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "account/firstname", consumes = {"text/plain"})
|
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/firstname", consumes = {"text/plain"})
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changeFirstname(@RequestBody String firstname) {
|
public void changeFirstname(@RequestBody String firstname) {
|
||||||
if (firstname == null) {
|
if (firstname == null) {
|
||||||
@ -87,7 +87,7 @@ public class AccountController extends BaseController {
|
|||||||
userService.updateUser(user);
|
userService.updateUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "account/lastname", consumes = {"text/plain"})
|
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/lastname", consumes = {"text/plain"})
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changeLastName(@RequestBody String lastname) {
|
public void changeLastName(@RequestBody String lastname) {
|
||||||
if (lastname == null) {
|
if (lastname == null) {
|
||||||
@ -99,7 +99,7 @@ public class AccountController extends BaseController {
|
|||||||
userService.updateUser(user);
|
userService.updateUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "account/locale", consumes = {"text/plain"})
|
@RequestMapping(method = RequestMethod.PUT, value = "api/restfull/account/locale", consumes = {"text/plain"})
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void changeLanguage(@RequestBody String language) {
|
public void changeLanguage(@RequestBody String language) {
|
||||||
if (language == null) {
|
if (language == null) {
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Configuration status="warn">
|
|
||||||
<Appenders>
|
|
||||||
<Console name="LogToConsole" target="SYSTEM_OUT">
|
|
||||||
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
|
|
||||||
</Console>
|
|
||||||
</Appenders>
|
|
||||||
<Loggers>
|
|
||||||
<Logger name="com.wisemapping" level="warn">
|
|
||||||
<AppenderRef ref="LogToConsole"/>
|
|
||||||
</Logger>
|
|
||||||
<Logger name="org.springframework" level="warn">
|
|
||||||
<AppenderRef ref="LogToConsole"/>
|
|
||||||
</Logger>
|
|
||||||
<Root level="warn">
|
|
||||||
<AppenderRef ref="LogToConsole"/>
|
|
||||||
</Root>
|
|
||||||
</Loggers>
|
|
||||||
</Configuration>
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||||||
public class RestHelper {
|
public class RestHelper {
|
||||||
|
|
||||||
public static final String HOST_PORT = "http://localhost:8080";
|
public static final String HOST_PORT = "http://localhost:8080";
|
||||||
public static final String BASE_REST_URL = HOST_PORT + "/service";
|
public static final String BASE_REST_URL = HOST_PORT + "/api/restfull";
|
||||||
public static final String ADMIN_CREDENTIALS = "admin@wisemapping.org" + ":" + "test";
|
public static final String ADMIN_CREDENTIALS = "admin@wisemapping.org" + ":" + "test";
|
||||||
public static final String COLOR = "#000000";
|
public static final String COLOR = "#000000";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user