mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Renove http basic.
This commit is contained in:
parent
37d7a9bb6d
commit
88d5f0df43
@ -54,7 +54,7 @@ public class RestAppConfig {
|
|||||||
}))
|
}))
|
||||||
.csrf(AbstractHttpConfigurer::disable)
|
.csrf(AbstractHttpConfigurer::disable)
|
||||||
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
||||||
.httpBasic(withDefaults())
|
// .httpBasic(withDefaults())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2022] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package com.wisemapping.config.rest;
|
|
||||||
|
|
||||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
|
||||||
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
public class ServletConfig implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> {
|
|
||||||
public void customize(ConfigurableServletWebServerFactory factory){
|
|
||||||
factory.setPort(8081);
|
|
||||||
}
|
|
||||||
}
|
|
@ -124,17 +124,16 @@ public class MindmapManagerImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mindmap getMindmapByTitle(final String title, final User user) {
|
public Mindmap getMindmapByTitle(final String title, final User user) {
|
||||||
final Mindmap result;
|
|
||||||
final TypedQuery<Mindmap> query = entityManager.createQuery("from com.wisemapping.model.Mindmap wisemapping where title=:title and creator=:creator", Mindmap.class);
|
final TypedQuery<Mindmap> query = entityManager.createQuery("from com.wisemapping.model.Mindmap wisemapping where title=:title and creator=:creator", Mindmap.class);
|
||||||
query.setParameter("title", title);
|
query.setParameter("title", title);
|
||||||
query.setParameter("creator", user);
|
query.setParameter("creator", user);
|
||||||
|
|
||||||
List<Mindmap> mindMaps = query.getResultList();
|
List<Mindmap> mindMaps = query.getResultList();
|
||||||
|
|
||||||
|
Mindmap result = null;
|
||||||
if (mindMaps != null && !mindMaps.isEmpty()) {
|
if (mindMaps != null && !mindMaps.isEmpty()) {
|
||||||
result = mindMaps.get(0);
|
result = mindMaps.get(0);
|
||||||
} else {
|
|
||||||
result = null;
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -311,13 +311,10 @@ public class Mindmap implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getDefaultMindmapXml(@NotNull final String title) {
|
public static String getDefaultMindmapXml(@NotNull final String title) {
|
||||||
|
return "<map version=\"tango\" theme=\"prism\">" +
|
||||||
final StringBuilder result = new StringBuilder();
|
"<topic central=\"true\" text=\"" +
|
||||||
result.append("<map version=\"tango\" theme=\"prism\">");
|
escapeXmlAttribute(title) +
|
||||||
result.append("<topic central=\"true\" text=\"");
|
"\"/></map>";
|
||||||
result.append(escapeXmlAttribute(title));
|
|
||||||
result.append("\"/></map>");
|
|
||||||
return result.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static private String escapeXmlAttribute(String attValue) {
|
static private String escapeXmlAttribute(String attValue) {
|
||||||
|
Loading…
Reference in New Issue
Block a user